Starting two times firefox on different monitors - linux

i'm using openthinclient and try to create a script that starts iceweasel in fullscreen on a machine two times on different monitors (each instance on a different monitor).
Is that even possible?
At the moment I only run
iceweasel -new-window http://stackoverflow.com -new-window http://www.google.com
So two instance are running. How can I move the windows to other monitors?

If I remember well on Fedora you can choose the display before starting a windowed app by setting the var DISPLAY:
xhost +localhost
DISPLAY=:0.0
gui-app
The first number of DISPLAY=:X.0 is the number of the display.
Try with your OS (Debian?)
The list of commands that works for me on Centos 7:
xhost +localhost
DISPLAY=:0
firefox => openned on the first monitor
DISPLAY=:1
firefox => openned on the second monitor

Related

vnc screen is freezed, not fixed by rebooting

I had several programs running on a server, which I connect to with VNC Viewer. And for some reason firefox became unresponsive, and the screen froze. I followed these steps:
vncserver kill -9 :1 to kill the process
vncserver :1 to start a new one
sudo reboot
However, when I reconnected, the screen was still frozen and I could not even move the mouse cursor. Here is a screenshot:
Whoops! I found the reason for that, I had mistakenly checked the view-only checkbox. Here is the screenshot:

Whey the applications running in VNC shows up in host instead of in client?

When I connect to the vnc server with vncviewer, I get a stranger thing: I can see the desktop of gnome or xfce4 and their menus, every GUI application I launch doesn't show up. At first I thought the applications failed to run. Then I found the applications appeared in the vnc server's screen! My settings are:
vncserver: tigervncserver on Debian 10
the content of ~/.vnc/xstartup:
unset SESSION_MANAGER
exec /usr/bin/xfce4-session &
vnc client: xtightvncviewer on Debian 8
I use the client to connect a vncserver on Ubuntu 18, it works well. Do you have any suggestion to debug this issue? Thanks.
On my Ubuntu/XFCE enviroment, on the host device, my DISPLAY env variable is set to :1.0 and not :0 , so when I started a vnc on :1, the applications would pop up on the host display. Just start the vncserver on :2 or above, and the problem will not occur.

Run a gui based application on a remote Linux machine using telnet

I need to run a gui-based application on a remote PC to which I am connected over telnet. The remote PC runs Linux Ubuntu 18.04
To figure out the screen, I run the following command on the remote machine:
echo $DISPLAY
which gave me :1 as result.
Then I run the program on the remote machine from my client (over telnet) using:
DISPLAY=:1 application_name
The program started correctly (since, in addition to the GUI, it prints some things on the command line) but the GUI didn't show up. But, if I run my app directly on the remote machine, everything is fine.
As a test, I tried to run firefox browser on an another machine (always through telnet) with the following command:
DISPLAY=:0 firefox
and it worked. Note: on the other machine the output of echo $DISPLAY was :0. Furthermore, I could not test my app on the second machine.
It seems that there are different settings between the two machines since what I'm trying to do works on a machine, but not on the other.
Do you have any idea of what type of setting should I check?
Did you try to run your application on the first remote machine but with DISPLAY=:0 instead of :1?
What is the error message you get from application when you started application in the first case ("DISPLAY=:1 app_name").

Is there 3 processes when start the sshd service in cygwin?

After I have started sshd service in my cygiwn(1.7.33 64bit on win8.1 64bit), there has 3 processes( in red box) and two of them have dynamic pids(yellow box). If I use kill command for the process in the yellow box, it responce no such process, but if you use the ps command again, you will see they are still there, but with a different pids.
http://i.stack.imgur.com/hAU4e.png
http://i.stack.imgur.com/Q6all.png

Quitting ssh -X session with a running GUI program but leaving the program to run on the remote host

I have ssh-ed to a remote machine. I have enabled X11 forwarding (ssh -X) and I have started a GUI program.
The program takes 5 minutes to set up to do some processing but the actual processing takes 1-2 hours. I don't want to stream data while the program is working. I don't even want to see the program again as it produces files as output when it finishes and I can just scp them.
So how can I quit the ssh session but leave the program running on the machine? CRTL+C in the terminal?
EDIT: For the answer please see my comment just below.
Long story short - you can't do this without making some modifications to the way you run things. A GUI application requires for an X server target to be accepting it's GUI updates - if you're using your local X server to do this, then it'll require (1) the connection to be open (2) that you actually handle the updates.
A way around this is to use something like Xvfb - which is a headless way of hosting a virtual X-server. Above and beyond the examples provided on the wikipedia page, folks who seem to make frequent use of this mechanism are Selenium users.
Awesome, I've been looking for an acceptable answer to my problem for hours, and finally one pops up. ssh -X -f login#machine yourprogram worked perfectly for me. Though I used ssh -Y -f login#machine yourprogram. This has been driving me nuts.
Like some people said, SSH -X is using your local X server, so it needs the connection. I had the same problem, wanted to quit ssh but leaving GUI applications running. To do this I installed X server and VNC server on the remote host. With a VNC client on your local computer, you can easily connect to the VNC server and disconnect leaving GUI applications running.
By the way, you will have better performances with VNC or X2Go. In my case, Firefox was very slow and some sites didn't load at all with SSH -X, even with -Y or -C optimizations.
Running ssh -X -f login#machine yourprogram should do the trick.
Starting your program with nohup program & will make it safe to just close your terminal - program will still be running.
You won't be able to see the UI after you end ssh session, but since you don't need it anyway - it's going to do the job.

Resources