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

73
votes
3answers
27k 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.
63
votes
5answers
23k 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 ...
53
votes
8answers
27k 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 ...
35
votes
15answers
20k 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?
32
votes
4answers
19k 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 ...
30
votes
10answers
10k 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 ...
25
votes
2answers
15k 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. ...
24
votes
2answers
4k 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 ...
24
votes
5answers
12k 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
4answers
9k 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 ...
21
votes
5answers
6k 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
1answer
6k 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 ...
19
votes
3answers
8k 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
7answers
11k 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 ...
17
votes
1answer
12k 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 ...
16
votes
4answers
15k 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 ...
16
votes
3answers
6k 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 ...
15
votes
1answer
3k 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?
15
votes
1answer
4k 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 ...
14
votes
9answers
10k 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 ...
14
votes
2answers
5k 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 ...
14
votes
3answers
2k 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 ...
13
votes
5answers
2k views

PuTTY or OTHER - Keep executing command even after exiting PuTTY [duplicate]

I have a couple of commands that I need to run. These commands needs to continually run even after I exit my interface. When I have access to the Linux GUI, I execute something like: cd ...
13
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 ...
13
votes
2answers
4k 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
3k 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
3answers
13k views

How to execute a 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 ...
13
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 ...
13
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 ...
12
votes
1answer
728 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? ...
12
votes
5answers
5k 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
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 ...
11
votes
1answer
8k 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.
11
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 ...
10
votes
1answer
3k views

Gnu screen: kill a frozen tab

How to go about closing a stalled screen tab (the machine is no longer reachable) ?
10
votes
1answer
3k 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 ...
10
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 ...
9
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
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
1answer
935 views

Is there a way to sort my windows within a screen session?

I use screen and have ssh sessions open to a number of different machines from within my screen session. I'd like to keep them in order, for obvious reasons. Often I'll have to connect to a new ...
8
votes
9answers
16k 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
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 ...
8
votes
5answers
9k views

rename tmux window name to prompt_command, ps1 or remote ssh hostname?

I would love to be able to have my tmux window title automatically renamed to prompt_command, ps1 or just the hostname of a machine I ssh to. having 9 windows opened labeled "ssh" is really useless. ...
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
746 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
3answers
402 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
278 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
6answers
8k views

How switch between screen inside screen?

I have to work inside two environment. One Windows (local) and one Linux (remote). I've installed the screen linux utility in both. I'm able to open a screen on my windows, then in one tab, I opened a ...
7
votes
3answers
1k views

GNU Screen - Removing vim window after quit

I use urxvt with GNU screen with X11 on my mac. I like it a lot. My only issue, is that when I quit vim, it puts the shell prompt underneath the vim window. This isn't a huge issue, but it ...