Hack #34. Disconnect Your Console Without Ending Your Session
Start a long-running job at work and connect to it from home or on the road.
Here's the setup: you're a Linux systems consultant with a busy schedule. It's 9 A.M. now, and you're already an hour into a very large database installation at one site, but you have to be at another site in about an hour. The build will never finish in time for you to thoroughly test it, create the developer databases, and set up security restrictions before you leave. What do you do?
One solution, of course, is to talk to your client and tell him you'll be back later to finish up. Another solution, however, may be to start the job in a screen session and log in later from wherever you happen to be to finish up. Lest you think that this will involve building yet another piece of software for your machines, take heart in knowing that screen is usually installed or readily available and prepackaged for whatever distribution you're running. You can also get more information on screen, including download information, at the GNU screen home page: http://www.gnu.org/software/screen/.
Getting started with screen couldn't be simpler. Just open your favorite terminal emulator and run the command, like this:
$ screenYou will be greeted with a new shell, running inside a screen session. You can still talk to screen from within the shell, much like you can talk to any console terminal application from within a shell. The key combination you use to send input ...