== Getting a useful persistent VNC session By a persistent VNC session, I mean a session that you can connect your VNC viewer to, do stuff, disconnect from, and then later come back to connect to it again. This makes it the graphical equivalent of [[screen ScreenX]], at least for me. (Much like _screen_, it also gives you a certain amount of immunity against network and workstation stability problems for critical tasks that you don't want interrupted. More and more, systems have to be managed graphically instead of through text interfaces, which means that _screen_ isn't good enough.) VNC generally comes with a program, _vncserver_, that starts and manages VNC sessions, and it even puts them in the background for you. The magic secret to useful persistent VNC sessions is simple: ignore this backgrounding and ~~always start vncserver with _nohup_~~, because _vncserver_'s backgrounding is only doing half the necessary job. If you don't do this, what happens can be confusing: once you close the terminal window or log out or whatever from the shell that you ran _vncserver_, all of the client programs get disconnected from the server, so when you (re)connect to the VNC session all you see is the plain black and white X background. (Specifically, _vncserver_ just uses '_&_' in the shell to start things in the background, which doesn't protect them from getting a _SIGHUP_ when the session exits, and the VNC X server itself reacts to _SIGHUP_ by terminating all of the current client connections.) ~~Update~~: [[Pete Zaitcev http://zaitcev.livejournal.com/]] pointed out in email that people who use normal shells won't see this problem and should just use plain _vncserver_, without _nohup_ et al. The problem happens for me because I'm using a [[shell NonstandardShellAdvantage]] that doesn't do job control.