After years of tweaking bash scripts to make using GNU Screen (http://www.gnu.org/software/screen/
) I finally found the replacement: BYOBU (http://byobu.co/
) It does everything I needed scripts to accomplish out of the box, and does more than I even know yet.
If you're not familiar with GNU screen, you run it in your remote session before you run anything else. It will start your shell inside of it and you can then start some process that might take a long time (compiling, encoding, upgrading, etc) The process will stay running even when you diaconnect, and you can then re-attach to the session later.
With screen, it would create its own numeric name for each session if you don''t specify one when you run it. Then if you want to reconnect you need to look at what the name is and reattach to it. I was using different scripts to start named sessions or reattach to them if they already existed.
Byobu on the other hand automatically reconnects to a detached session without any special configuration (other than training the brain to remember to type byobu before starting any program). By default (in Ubuntu anyway) it comes configured to show a status bar at the bottom of the terminal showing the OS and version, system uptime, CPU speed and usage. ram usage, the date, and the time.
It does a lot more than my short description could ever say. If you ever spend time accessing remote servers and want to be able to disconnect while leaving what you were in the middle of doing running you should definitely check this out.