The Deliverator – Wannabee

So open minded, my thoughts fell out…

Terminal Multitasking

Posted by Deliverator on March 25th, 2008

One of the things I like best about my n810 is its ability to serve as a remote access client using RDP, VNC or SSH. With RDP and VNC, the bandwidth requirements are such that a WiFi connection is needed to work efficiently. With SSH, the bandwidth requirements are much lower, such that I can effectively use my N95’s EDGE wireless wan connection. While T-mobile’s EDGE coverage around the Seattle area is good, it is simply not practical to keep the connection up all the time. Even if the coverage were perfect, battery life issues would prevent a continuous connection all day long.

Unfortunately, by default SSH only gives you a single terminal session in which to launch applications. If the connection is interrupted, so is any app you might have been running. What is needed is a way to multitask and keep the application running. Screen fits the bill nicely. With it, I can ssh to a server from my n810, start up multiple command line tasks and before disconnecting, decouple any apps I wish to keep running from the session. I can then move elsewhere, reconnect to the server using ssh and with the simple command screen -r, reconnect all those running apps to my new session. This ability comes in really, really handy. I can leave things like IM clients, IRC clients, email, network monitoring apps, backup jobs, long software compile operations, etc. running all day long and just connect to them as needed. If you haven’t given screen a try, I highly recommend starting off by reading this introductory guide, as official documentation is sparse.