Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been meaning to learn screen for a long time, but have never gotten around to it.

What are you favorite tips?

Please try to keep one tip per answer so that we can vote properly, but feel free to answer multiple times.

Reference: http://www.manpagez.com/man/1/screen/

share|improve this question

closed as not constructive by Sathya May 25 '11 at 7:11

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

6 Answers

Among using split / vertical split or byobu for obvious reasons, one of the things I had a problem with was sending ^s or ^q to some applications (e.g. rtorrent) within screen as these shortcut keys conflicted with others I have set (^q = close window).

One way to get around this is to hit ^aq to send ^q to a program running within screen.

share|improve this answer
add comment

screen -dr will always reconnect for me. This is assuming just one screen session is running, etc.

share|improve this answer
add comment

It isn't a great tip, but if you are an emacs user, like me, maybe you'll find useful mimic its key bindings (at least for what concerns splitting windows), in my ~/.screenrc I have:

escape ^xX

bind 2 split
bind 3 split -v
bind o focus
bind ^c quit

So, for example, Ctrl - x 2 will split the region horizzontally.

share|improve this answer
add comment

You seem to use Ubuntu Linux, so you could easily install byobu, a nice preconfigured screen variant.

share|improve this answer
    
I noticed that too. I tried it out and it's quite simple to use. I think I'll keep it. –  bukzor Sep 26 '10 at 16:12
    
or .. tmux.sf.net –  akira Oct 3 '10 at 20:37
add comment

screen -x [screen_session_name] allows you to attach to a screen session that is already attached, for multiple displays and screen sharing.

I posted this as a separate answer so it can get separate votes. I assume that's how it's done.

share|improve this answer
add comment
screen -R -DD <pid>

That will force screen to reconnect to the terminal session no matter what happens.

share|improve this answer
    
screen -rd will do the same without even needed the pid unless you have multiple screens running. –  Chris Oct 9 '10 at 0:34
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.