j_kubik |
08-31-2010 02:33 PM |
ssh command, nohup and startx
Hello
I am having a server, which normaly doesn't use X. However i am using Xvfb when i connect to it via SSH, and seting tunneling to vnc port. Server script looks like
Code:
#!/bin/bash
xset -display :25 -q &> /dev/null
if [ $? != 0 ]; then
echo "Starting X'es"
nohup startx startkde -- Xvfb :25 -screen 0 1270x740x24 &> /dev/null &
else
echo "X'es started"
fi
x11vnc -display :25
When I log in interactively via ssh, and then run the script, the Xvfb session lasts as long as i don't log out of kde - which means that i can freely create and close VNC connections without killing X sever.
However when i use ssh remote command to automate process (simply a saved putty session with set up host address, tunneling and script name) then as soon as i close VNC connection and script ends, the Xvfb also gets killed. It's happening despite using nohup. Is this behavior normal? How to make Xvfb last?
|