GNU Screen is a command line utility which allows the user to create multiple shell sessions on one connection. These sessions are decoupled from the primary connection and so maintain state for the user, even if the connection is dropped.

learn more… | top users | synonyms

58
votes
3answers
22k views

Rename screen session

Is it possible to change the name of a GNU screen session? Say I called started it with "screen -S foo" and I want to rename it to bar.
54
votes
5answers
18k views

tmux vs. screen

I'm about to get back into using screen, but I have been hearing people occasionally mention tmux as a better alternative. Does it really offer an alternative to all the features screen offers, such ...
36
votes
6answers
21k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
29
votes
9answers
9k views

How do you get screen to automatically connect to the current ssh-agent when re-attaching to an existing screen?

If you start a screen session while ssh-agent is running (from ssh -A agent forwarding), accessing ssh-agent works fine. However, if you detach from that session, log out, log in again (with ssh-agent ...
28
votes
15answers
17k views

What's the best prefix/escape sequence for screen or tmux? [closed]

Screen goes with CTRL+a. tmux, as developed within screen, uses CTRL+b. Both are also keystrokes in other editors, shells, etc. What do you suggest, which one conflictes at least with other programs?
24
votes
2answers
12k views

Unix: How to unsplit in screen

I'm trying to learn how to use screen, in unix so that I don't have to open up several ssh connections and terminal windows just because I want to do more than one thing at the same time on a machine. ...
21
votes
5answers
10k views

Bash vs. Gnu screen : Replace Ctrl-A with Ctrl-Shift-A

I'm a new user to GNU Screen. I've been using Bash for a very long time, and I want to give GNU Screen a try. As you know, GNU Screen uses 'C-a' (Control-A) as as the command character. Trouble is, ...
21
votes
2answers
3k views

Slight delay when switching modes in vim using tmux or screen

Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After ...
20
votes
4answers
16k views

Byobu versus gnu screen versus tmux

So far I have used konsole to manage multiple shell sessions but it seems that byobu, gnu screen, and tmux offer a better support for multiple shells. I have never used neither of them before. One of ...
19
votes
3answers
8k views

How to scroll up and look at data in GNU screen

I am using a mac (snow leopard). I am a ruby on rails developer and I watched a screencast on GNU screen and am trying it out. So far I like it. On a window when I start server I get to see the log ...
19
votes
5answers
5k views

How to keep windows split after detaching/reattaching GNU screen

I use screen in a Ubuntu server. I have my screen splited in four regions each showing a different window. The problem is when i detach (or maybe reattach) a get the four windows but only one region ...
19
votes
3answers
7k views

Screen a running process

Sometimes I forget to run a program under a screen session and can't stop it in the middle, and I know it's going to take long. Is there a way to screen an already running process without restarting ...
17
votes
6answers
9k views

GNU screen - Unable to reattach to screen after lost connection

I was using irssi in screen but lost connection. After I ssh'd back in to the server, I can no longer attach to that screen. screen -ls shows that the screen is already attached. I tried screen -D to ...
16
votes
1answer
5k views

Binding a command in tmux without using the prefix key

Is it possible to bind a tmux command to a key combination and use it directly without first pressing the prefix? I find C-b + n too cumbersome to switch panes, so I was wondering whether I could ...
16
votes
1answer
11k views

How do I reconnect to a lost screen (detached, missing socket)?

I had a screen session running on a home server. My workstation needed a reboot, so I detached and killed the terminal. Upon reconnecting to the server, I execute my typical $ screen -D -R [new ...
15
votes
3answers
5k views

Use GNU screen as login “shell”

What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else? I see the most common recommendation is to put exec screen in your regular ...
14
votes
4answers
11k views

How can I view more of my history in Screen on Linux?

I was running scripts overnight from the command line (inside Screen on a Linux EC2 instance) and some errors that I was not tracking occurred. I want to "scroll up" or view more of the history in ...
14
votes
1answer
3k views

how to include screen's session name in hardstatus?

I use different screen sessions for different projects. Starting screen like screen -S project1. Now, I'd like to mention 'project1' in hardstatus line. Session name can be obtained from environment ...
13
votes
2answers
3k views

Sharing a GNU Screen Session

I have a meeting with a professor coming up shortly, but he won't be at school for a face-to-face meeting, but instead will meet with me via Skype and a SSH login. I'm a heavy user of GNU Screen, but ...
13
votes
2answers
2k views

Problem with GNU Screen when using Emacs C-x C-s (save-buffer)

When I am using emacs under GNU Screen, if I call C-x C-s screen hangs and does not respond to any keyboard input. I can't reproduce this, but at least one time per day I have to kill my screen ...
13
votes
8answers
9k views

Vertical Split in GNU Screen on Mac OS X

I recently became enamored with the excellent app in Ubuntu GNU screen. I was really happy to see it installed on my Mac as well, but I can't split vertically... I guess I need to update it somehow. I ...
13
votes
2answers
4k views

Updating screen session environment variables to reflect new graphical login?

I use linux, and I like to do all my command-line work within a single screen session, so that I can restart my graphical login and such without losing my terminals. However, when I log out and back ...
12
votes
1answer
2k views

How to switch between two latest windows in tmux?

screen has a Ctrl-a,Ctrl-a to switch between two latest windows? How to do it in tmux?
12
votes
5answers
6k views

alternatives to Gnu screen under Cygwin

Are there any terminal multiplexers for Cygwin/Windows other than Gnu's screen? I know of 2 alternatives to the Gnu's screen application: Byobu and TMux. However, neither of these run under Windows ...
12
votes
1answer
2k views

How to prevent clearing of terminal output when I “exit” an SSH session?

This is the situation: I open a terminal in Ubuntu, and do ssh host-1, which works as expected. From host-1, I do ssh host-2, which again works fine and connects me to host-2. From host-2 I do, for ...
12
votes
5answers
4k views

What is the best GNU screen “taskbar” you've used/seen? [closed]

As some of you may know, screen offers an ability to have a "taskbar"-like bar that is always present and helps navigating around windows, etc. I find this bar irreplaceable. What is the best ...
12
votes
6answers
6k views

How can I automatically update the title in an xterm running screen?

This is a bit of a followup to this question. I'm working in tcsh within GNU screen in an xterm. I have the following in my .cshrc: alias res_t 'xtset -t %h:%d "(%u:%g)" %e' # reset titlebar ...
11
votes
1answer
640 views

GNU Screen on MacOS 10.8 says “Be careful! New screen tonight”

GNU Screen on MacOS 10.8 says "Be careful! New screen tonight" when it starts up screen sometimes. Any ideas what causes this, or is there a way to disable it and/or change the text to something else? ...
11
votes
4answers
2k views

Flashing window in gnu screen

I really like gnu screen but there is a problem in my environment when I use it. Examle: username@domain:/var/www$ l Display all 130 possibilities? (y or n) when you click [Tab] to perform ...
10
votes
3answers
10k views

How to run command in screen and detach?

How can I get screen to execute a command and then detach (That is, automatically in a single script without further input beyond initially starting the script)? e.g. I run myscript.sh and it ...
10
votes
2answers
3k views

Make GNU screen survive reboot

I am using GNU screen a lot. I find it very annoying that everytime the server has to be rebooted I lose all my sessions (even if I know in advance, I need to set-up everything again). I've searched ...
9
votes
1answer
7k views

How do I use tabs with the Linux “Screen” program?

I'm using multiple screen windows and am wondering if it's possible to add a tabbed interface to it, with tab names and keyboard shortcuts for moving between the tabs.
9
votes
4answers
1k views

X equivalent of 'screen' utility

Under unix/linux, there is this extremely useful program screen: it's for bash, text-only, and I can detach a session, log out (the session is still running though), log in later (even from a ...
9
votes
2answers
1k views

Is there an easy way to save a byobu session such that I can reload it after a reboot?

I understand that there is a way of defining windows that are opened in a session by saving configuration files in $BYOBU_CONFIG_DIR. But is there a way (command or script) to save the current session ...
8
votes
9answers
14k views

Running commands on Putty without fear of losing connection

How do you use the "screen" command effectively? Is it: Type "screen" Type in command Lose connection Check back on lost session How do I carry out step 4?
8
votes
2answers
2k views

Can I name GNU screen sessions?

I use multiple sessions for different things. One for work, one for school work and one each project I'm working on. It gets really hard to keep track of the sessions when screen -ls returns ...
8
votes
2answers
625 views

GNU screen: key to access tabs above 9

Using GNU-Screen for a long time. C-a 1 2 n p to navigate to other tabs. This works till 9. I often have 10, 11 etc. Is there any way to go to them quickly ? Currently, i have to do: C-a 9, ...
8
votes
1answer
2k views

Prevent gnu screen from resizing display size

Every time I start screen (screen -A) or try to connect to an already running screen session (screen -Ax) my terminal is resized to 80 columns. I want to prevent screen from resizing my terminal. I ...
8
votes
2answers
2k views

Is it a good idea to put “screen -r” in my .bashrc?

I'd like to use screen to keep ssh sessions alive on my server. It would be nice if I could automatically resume any running session for my user when I log in. The straightforward way to do this would ...
8
votes
3answers
375 views

Tabbed terminal that connects to a GNU Screen session?

I use the session feature of screen extensively. For example, I'll start a screen session for "project1" as "screen -S project1", and then when I need to reconnect I use "screen -d -r project1". ...
8
votes
2answers
247 views

gnu screen - Copying text between windows

Is it possible to paste text copied in a paste buffer to a different window with some keybinding, without having to leave the current window? I.e., instead of going to the window and doing a Ctr-a + ...
7
votes
4answers
2k views

How do you run a gnu screen within a gnu screen?

Is it possible to run a gnu screen within a gnu screen? I'm not sure how the key bindings would work. I need to log into a server that is already running a screen session, from a local screen session. ...
7
votes
4answers
3k views

How to force Gnu screen to load my bash .profile

I have ~/.bash_profile which I would like to be invoked every single time a new GNU screen is created so that all my aliases work in GNU screen as they work in terminal. At this time this is what my ...
7
votes
1answer
2k views

Gnu screen: kill a frozen tab

How to go about closing a stalled screen tab (the machine is no longer reachable) ?
7
votes
2answers
3k views

How to prevent screen from resizing my Terminal in Mac OS X?

I am using iTerm in Mac OS X. When I run screen, the terminal is resized and I get the message Aborted because of window size change. However, screen is still running. How do I get it to stop ...
7
votes
4answers
2k views

How do I get GNU screen not to start in my home directory in OS X?

GNU Screen (screen) behaves differently on OS X 10.5 (Leopard) and 10.6 (Snow Leopard) compared to Linux (at least Ubuntu, Red Hat, and Gentoo) and OS X 10.4 (Tiger). In 10.5 and 10.6, new screens ...
7
votes
2answers
2k views

Is there a way to have shared control tmux session?

I'm looking for something similar to the screen -x of gnu screen for Linux
7
votes
6answers
2k views

ssh-agent and screen

A while back on StackOverflow, I asked this question about ssh-agent and crontab. I have a similar question now about ssh-agent and screen on linux systems. So, on my Mac, ssh-agent launches at ...
7
votes
2answers
597 views

Can I steal a vim session from another terminal?

I forgot to start screen before I started working, and now I've SSH'd into my machine from my laptop. ps -a gives me the process ID of the vim process. Can I steal the vim session from my other ...
7
votes
2answers
2k views

Gnu Screen: Execute command on attach

Is there a way to have GNU Screen detect when it is being attached and to execute a shell script that I have whenever it is attached? The reason for this is that I want to keep my display variables ...