More on GNU Screen
Using GNU Screen can make life much easier, but how often do you start a job and then realize "I wish I'd started
screen first"? I used to do it all the time, then I configured things so
screen starts by default when I log into my server.
Why do I want
screen to start automatically when I log in? Like
many folks, I work from more than one computer. I like to be able to SSH into
a machine and pick up where I left off from another system. Many admins and
other users like to run their IRC sessions with a combination of GNU Screen
and irrsi, just so they can have a persistent session. The more you use
the more you'll find that it's a good idea to jump right in on startup. But
to do that, you must either remember to start
screen every time,
or do it automatically. I vote for the automatic startup.
Sometimes people try to set GNU Screen as the default shell. That might work to some extent, but you also get some weirdness with programs that look into
/etc/passwd for your default shell. The best way to do it is to simply start screen from your
How to do that? It's a piece of cake, just add
screen to the
.bash_profile, and you're good to go.
Another tip? Turn off the default screen message by editing
/etc/screenrc and adding this to the configuration file:
If you're an Ubuntu user, you can also use
byobu in place of
screen. See Juliet Kemp's recent piece on Byobu for more on that.
Final note -- if you're already logged into a session, you'll need to log out or source your profile before it will take effect.
GNU Screen is a powerful ally, use it well and often, you'll find it can help make life much easier.
Joe 'Zonker' Brockmeier is a freelance writer and editor with more than 10 years covering IT. Formerly the openSUSE Community Manager for Novell, Brockmeier has written for Linux Magazine, Sys Admin, Linux Pro Magazine, IBM developerWorks, Linux.com, CIO.com, Linux Weekly News, ZDNet, and many other publications. You can reach Zonker at firstname.lastname@example.org and follow him on Twitter.