If you’ve spent hours on a task, such as debugging an application, it can be maddening to lose your work in an instant. This article shows you how to keep your shell and your work alive, even across multiple sessions and dropped connections using GNU Screen. Screen is a remarkable tool that you will quickly find invaluable in any work you perform on the command line. In fact, use it once, and you will wonder how you ever lived without it.
My favorite option From the man page
nethack on|off
Changes the kind of error messages used by screen. When you are familiar with the game “nethack”, you may enjoy the nethack-style
messages which will often blur the facts a little, but are much funnier to read. Anyway, standard messages often tend to be unclear as
well.
This option is only available if screen was compiled with the NETHACK flag defined. The default setting is then determined by the
presence of the environment variable $NETHACKOPTIONS.
Can you give an example?
examples:
Regular message => nethack message
“Copy mode aborted”=>”You escaped the dungeon.”
“Filter removed.”=>”You have a sad feeling for a moment…”
“Window %d (%s) killed.”=>”You destroy poor window %d (%s).”
“Detach aborted.”=>”The blast of disintegration whizzes by you!”
“Aborted because of window size change.”=>”KAABLAMM!!! You triggered a land mine!”
“There are several screens on:”=>
“Prove thyself worthy or perish:”
funny
I agree with this article, screen is a godsend especially when dealing with remote systems. The copy/paste feature alone is worth it on local consoles as well, though they didn’t cover that in the article. It can also be used very effectively as a serial terminal, if you ever need a quick and dirty serial connection to a headless box.
http://sourceforge.net/projects/tmux
Yeah, tmux is a cool alternative since 0.7.
Hell yes. I much prefer tmux over GNU Screen — for its licensing, its interface, its client/server architecture, its stability, and its lightweight design. GNU Screen has a few features that tmux lacks, but those features may as well not exist, considering the way I use a terminal multiplexer.
http://www.wikivs.com/wiki/Screen_vs_tmux
The nicest thing I like about tmux compared to screen, is that out-of-the-box, the keybindings don’t mess up CLI navigation. ie CTRL+A still means “beginning of line” and not “enter command mode”. Once less thing to configure on all the servers.
Now, if only someone would port it to Debian.
Compile it yourself? it should work on Linux.. BSD.. any Unix worth using.
For debian specifically, google relieved this:
http://mentors.debian.net/debian/pool/main/t/tmux
It’s outdated though, just compile it yourself.
macbook-pro:~ backdoc$ tmux
-bash: tmux: command not found
Screen is one of my all time favorite *nix programs. ever.
I love it. It is unbelievably useful, specially when having to deal with remote systems.
screen is an awesome program. Use it on a daily basis and work would be a lot more messy if I had to open separate terminals instead of just running screen.
I always wanted something like this, once tried screen, but had to little patience to read the manual. So I got stuck. This article revived that idea and now I’m screen’s fan. Especially split window mode and copy/paste.
Pick 3 or 4 things to use. It can be overwhelming to try to learn everything. Here’s my favorites:
While in screen:
Ctrl+c (create new session)
Ctrl+A (rename session)
Ctrl+” (show list of current sessions)
Ctrl+a,Ctrl+a (switch between current session and last one)
From the shell:
screen -ls (show current screen processes)
screen -dr <process> (detach then reattach to “process”)
If you just get used to using these, they will pay dividends. I’ll bet that there are more that I would love, if I knew them. But, I just stick with a few favs and they work for me. If you use the command line (which you should), you’ll be amazed how these few commands will increase your productivity and satisfaction.
Good luck.
It is a lovely program to use, especially if you run a big job on a cluster. I was talking to a geologist about best practices running programs on a Linux cluster and when I told him about screen and how it works he immediately got on the phone and was telling his friend about it.