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 is
When I log in normally via ssh, and then run a 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.
xset -display :25 -q &> /dev/null
if [ $? != 0 ]; then
echo "Starting X'es"
nohup startx startkde -- Xvfb :25 -screen 0 1270x740x24 &> /dev/null &
echo "X'es started"
x11vnc -display :25
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 it work?