GNU Screen

I’m not sure why, but I’ve never gotten around to learning to use screen. I’ve long wanted to be able to detach sessions and come back to them later, or leave processes running. bg just didn’t cut it sometimes for the latter; apt-get upgrades being a big one. Anywho, I stumbled across a nice little primer yesterday. A few quick commands… ctl+a is your Start Menu, kind of a vi command mode.

  • ctl+a c will create a new screen
  • ctl+a p/n switches to your previous/next screen
  • ctl+a A lets you name your screens
  • ctl+a “ your dock or task bar.. lists your screens by name
A screen session can also be shared which is just totally awesome. A terminal VNC, if you will.

update - fix delete key when using terminal on OS X - “If you’re connecting from OS X, you’ll need to set the terminal preference for Send Ctrl-h on delete key

update 2 Regions kick some major tail! from polishlinux.org

Regions are a very useful feature. They enable opening many programs and shells in one window of screen. To do it just press Ctl-a S. The window will split into two separate areas. There will be your actual shell at the top part of the window and the bottom part will be empty. To switch to the bottom part press Ctl-a [Tab]. You have to create a new shell in the new window, so press Ctl-a c. You can create more regions by pressing Ctl-a S more than once and creating new shells in them. Tabs display the active region shellname in its titlebar. You can also switch between tabs being in a region, so e.g: you have 4 tabs and 2 regions. Each region can display one of these tabs. A nice trick is that many regions can display the same tab and they will react simultaneously. It is difficult to describe but is very helpful when you work in multiuser mod and you want to see what another person is doing. You can change the size of each region by entering resize [size], where size is the number of lines.