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

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 ...
5
votes
1answer
2k views

Using screen, commands like less and man don't clear the screen afterwards

In contrast to this question I want the clearing of the screen re-enabled for less. It works fine in my xterm terminal under Cygwin/mintty or Gnome Terminal (both xterms). However, when inside a ...
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 ...
54
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 ...
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 ...
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 ...
4
votes
3answers
9k views

send command to an already running screen session

I have been trying to send commands to a running gnu screen session (4.00.03) in opensolaris, but cannot get it to run any commands through any combination of screen -X Ok, I start a screen session ...
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 ...
31
votes
4answers
20k views

Byobu versus gnu screen versus tmux [on hold]

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 ...
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 ...
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 ...
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 ...
4
votes
2answers
2k views

when running screen on OSX, command+r messes up arrow keys in vim across all screens

How do you unwind this? because you wind up pressing command r all the time to reload your browser, and often you're in the terminal. Since I haven't figured out how to re-enable the arrow keys, I ...
3
votes
1answer
842 views

ssh-agent key timeout with screen or tmux on bastion host

Normally I have ssh-agent running, I ssh to my bastion host then open a tmux session and connect to other boxes through that. Key forwarding works for any sessions that I open from that point ...
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?
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 ...
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 ...
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.
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 ...
6
votes
6answers
3k views

Removing the escape characters from GNU Screen's screenlog.%n

Is it possible to remove the ESC sequences in GNU Screen's output file? Things such as colours, tabs and other escape characters make their way into the log files and become difficult to decipher. ...
5
votes
2answers
2k views

Auto-reconnecting SSH connections with a specific 'screen' session

I typically have several terminal windows each of which is connected via ssh to a remote server. In each window I work using the gnu screen program, to ensure persistence of the interactive processes ...
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 ...
1
vote
1answer
3k views

Running nicklist with irssi using screen inside tmux?

I try to run the nicklist addon with irssi using screen inside tmux but strangely :) it doesn't work and I get the input on top of the screen. Is it possible to run nicklist when you are on tmux?
13
votes
3answers
14k 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 ...
7
votes
6answers
3k 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 ...
2
votes
3answers
1k views

ALT+arrow moving between words in ZSH and iTerm 2

I logged in on one of hosting provider servers and noticed ALT + left and ALT + right moved between words in a shell prompt in a screen. What kind of key bindings I need to configure and where to get ...
2
votes
1answer
487 views

gnu screen: find which screen window has a given running process or variable?

I would like to find out which of my ~50 gnu screen windows has a process running with a specific variable defined in it. For example, about a week ago, I did this: id=ABC123456; ~/run_long_process ...
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 ...
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. ...
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 ...
5
votes
2answers
7k views

How can I start multiple screen sessions automatically?

I'm trying to build a command that launches screen, creates four sessions with different names, and run four different commands. I know how to do this manually: 1. screen 2. ./command1 args 3. ...
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 ...
3
votes
1answer
866 views

Prevent an already running background process from being stopped after closing SSH client

I have a process running on my Linux machine (Debian squeeze) that takes hours (or days) to finish. I don't want to stop it to restart it again with screen, tmux or with an output redirect to nohup. ...
2
votes
4answers
830 views

Use gnu-screen and X instead of desktop environment?

I have a HTPC with Debian currently installed on. I would like to run applications which got a gui but without using a desktop environment such as gnome, kde etc. I was wondering if running X would ...
2
votes
3answers
8k views

How do I create several screen sessions on startup in Linux?

Firstly, what's the best way to execute commands on startup, cron? Can I use su in a shell script to switch between different users, if so how? How do I create several detached screen sessions on ...
1
vote
1answer
2k views

GNU screen sessions are dead after rebooting computer — how to fix this?

Whenever I reboot my computer, all GNU screen sessions die. I have to remove them with screen -wipe How can I fix that? Telling GNU screen to store sessions in my home directory apparently doesn't ...
0
votes
2answers
589 views

tmux chain keyboard shortcuts, or equivalent for screen's `bind -c` + `command -c`

One nice feature of screen is its ability to assign keyboard shortcuts to groups called "classes". With bind -c, you could assign that shortcuts to a particular class, and binding command -c ...
0
votes
1answer
3k views

Sending commands to an existing screen session?

I have a Java app running in a screen session (A game server), and I'd like to be able to write a script to send commands to it periodically (with cron probably), but I'm not sure how to send commands ...
6
votes
1answer
2k views

Mouse in screen(1) on the Linux console?

How can I use the mouse in GNU screen on the Linux console? I would expect this to have to go via gpm, but that doesn't seem to happen by default, even if the curses library does link to libgpm. (This ...
5
votes
2answers
2k views

Xserver that I can reconnect to

I'm looking for something like screen but for X? I imagine situation when I do something like "X --reconnect remote_server:11", and I am reconnected to pre-existing X session, with all programs that ...
4
votes
2answers
411 views

on quit, 'less' does NOT clear its contents when run in a 'screen' session [duplicate]

Possible Duplicate: Using screen, commands like less and man don't clear the screen afterwards When I quit 'less' in a normal bash, it clears the previous contents displayed by 'less' ...
3
votes
3answers
974 views

How to disable notify on “screen -D -R”

I'm running screen -D -R (with optionally using -S name), and it works great, but has one problem - when given screen doesn't exist earlier, i get notification "New screen...", and irritating wait. ...
2
votes
1answer
1k views

How do I get the F1-F12 keys to switch screens in gnu screen in cygwin when connecting via SSH?

I'm connecting to a desktop running cygwin via SSH from the terminal app in Mac OS X. I have already started screen on the cygwin side and can connect to it over the SSH session. Furthermore, I have ...
2
votes
4answers
2k views

Linux: aliases when using `screen`

I'm using screen, and I have several aliases in my ~/.bash_profile, for example python=python-2.6. But for some reasons these aliases don't work when I work in screen. How can I make them work?
2
votes
2answers
204 views

I am not seeing named session in gnu screen

I am tying to learn gnu screen. I am using mac(snow leopard). I am running 4.00.03 version of screen. I am starting a new screen with following command screen -S foo However after that if I do ...
2
votes
1answer
1k views

Dump/show ACL in GNU screen

I'm trying to make an interface to make it easier to set ACL in screen. Setting ACL is quite easy, however, I can't find a way to show or dump the existing ACL. A look in the archives of this list ...
1
vote
4answers
653 views

Windows powershell screen equivalent

I am using a windows machine as a ssh server. I want to remotely run some tasks which takes several hours to finish. Is there any way to have persistent process even after remote ssh session is ...
1
vote
2answers
2k views

Running Linux commands in the background: ampersand (&) or screen

Running an app in the background can be done by adding ampersand (" &") at the end of the app or via screen (by opening a screen session) if the app needs input now and then. Is there any other ...
1
vote
2answers
2k views

Load RVM environment in Screen and ZSH

This topic has been driving me nuts for a while now, and I'd like to be able to figure out what's going wrong. I use zsh with screen in my terminal, and have been for a while. However, for whatever ...
1
vote
1answer
187 views

How to disable input translation for some keys in GNU Screen?

I have Ctrl-Left and Ctrl-Right bound for vim, and would like to be able to use these shortcuts when vim runs inside screen. However, because of Screen's input translation my key presses are mangled ...