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

1
vote
1answer
17 views

Launch consecutive commands in screen

I would like to launch cmd1 and cmd2 in the same screen instance. I want cmd2 to be launched only when cmd1 has completed. I have tried this: screen -d -m ./cmd1.bash "$File" && ...
5
votes
1answer
1k views

Local echo using Screen to connect to a serial terminal

Reading through the book "Building Wireless Sensor Networks" I learned that you can use the Screen utility to attach to a serial console. I tried using it to connect to an XBee module and it seemed ...
57
votes
18answers
37k views

What's the least conflicting prefix/escape sequence for screen or tmux?

Screen goes with Ctrl+A. tmux on the other hand—as developed within screen—uses Ctrl+B. Both keystrokes, however, are also used in editors, shells, etc. Thus choosing either one degrades ...
0
votes
0answers
39 views

vim comment issue with GNU screen and solarized

I just installed solarized. I am using the Xresources and vim color file. All works fine when not inside GNU screen. When running vim from inside GNU screen, the comments look different - they are not ...
1
vote
0answers
19 views

SSHing gives me UTF-8, but using 'ssh -t' does not

I'm accessing my desktop machine using SSH to connect to a Screen session. If do this: ssh -p 12345 111.11.111.111 screen -r "Jelly" I have UTF-8 support working fine. However, if I do this: ssh ...
0
votes
1answer
589 views

In GNU screen, how do you reload .bashrc in all windows?

I typically use about 10 windows in GNU screen and am constantly customizing my .bashrc. I would like to be able to source .bashrc across screen windows with a one-liner. Can I broadcast a command ...
2
votes
4answers
6k views

How to remove many detached screen sessions in Unix?

I have been working in different screen sessions in past projects, so I have a few screen sessions accumulated. Now I have been asked to remove excess/unnecessary screen sessions from the Unix box. ...
0
votes
1answer
15 views

Screen does not read /etc/profile.d on startup

Whenever I start screen, my alias definitions in /etc/profile.d are missing within screen. How can I make screen read/source all files in /etc/profile.d/ on startup?
17
votes
3answers
7k 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 ...
107
votes
8answers
63k 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 ...
1
vote
1answer
10 views

Easily copy current command line in GNU-Screen

I want to copy the text command to copy in the current command line in a very fast way. user@server:~/somepath$ command to copy I know this way: Use Ctrl+[ to enter copy mode, Navigate by arrow ...
34
votes
2answers
7k 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?
0
votes
1answer
35 views

How can I move my current session from GNU screen to tmux?

My IRC client, irssi, is currently active inside a GNU screen session. In hindsight, I wish that I'd have used tmux instead of GNU screen. How can I migrate the active process (or session) from GNU ...
4
votes
4answers
2k views

How to persist `gnu screen` layout after restart

I am using the screen split in 3 with vim on the left, and two other screens split horizontally on the right. I know that when detaching from a screen, I can save the layout with :layout save ...
0
votes
0answers
14 views

Screen session behavior on shutdown

I want to run a PHP-Script inside a screen session at startup(I figured that out already). It is very important that the PHP-Script is exited like it does with "Ctrl + C". Now I don't really know how ...
21
votes
3answers
3k views

Move a program started in GNU screen out to another terminal

I want to terminate an instance of GNU screen whilst preserving the process running inside it. So I opened my regular terminal emulator program and executed screen. Then I used that instance of ...
3
votes
1answer
1k views

GNU screen freezes when starting session over SSH, works locally. What's wrong?

On an iMac running Snow Leopard I can open a terminal window and start a 'screen' session with no issues. However, if I ssh into the same machine (from elsewhere or locally) and then try to start a ...
0
votes
1answer
24 views

Can I pass a key combination through screen to a program?

I've got screen setup to switch windows with the function keys. However, I am trying out Vim debugging and to start it I'm told to use the F5 key. Obviously this just switches me to screen window 5 ...
0
votes
1answer
35 views

How to auto execute a command in screen window while creating a screen session

I have configured my .screen rc to create 10 windows while creating a screen session as screen -t task1 0 screen -t task2 1 screen -t task3 2 . . What I want is whenever I ...
1
vote
2answers
111 views

iTerm2 -> ssh -> gnu screen -> split window: scroll wheel not working

I'm using Mac OS X as a workstation. With iTerm2, I connect to a remote host (Ubuntu Server) using this command: ssh -t user@host screen -D -R -R But I can't get the scroll wheel to work correctly, ...
3
votes
1answer
82 views

Generate encrypted password for a GNU screen session

How to programatically generate a password for a GNU screen session? Normally, to define a password for an existing GNU screen, we have to: Start a screen Do Ctrl+A :password Upon reattach, screen ...
0
votes
0answers
20 views

GNU Screen gives odd linewrapping behaviour for terminal applications

I followed these instructions to set up GNU Screen to run two terminal applications on Computer A, then connected to them from Computer B. However, on Computer B, I seem to get strange linewrapping ...
12
votes
3answers
1k 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
2k views

How to go past window 9 in GNU Screen without going to Window list? [duplicate]

I use GNU Screen tool to keep my sessions alive on the system. To switch between windows I use Ctrl+a N where N is the number of the window. I want to use similar keystroke to access windows with ...
1
vote
0answers
40 views

Running GNU Screen on Raspbian with vertival split spilling content

I am running Screen on a Raspberry Pi. My shell on the Pi is ZSH with OH-MY-ZSH. I have connected to the Pi via SSH from a Mac. When I run certain commands like HTOP or Vim the output spills over to ...
3
votes
1answer
51 views

Why is GNU screen interfering with Vim's Ctrl-Pageup to switch tabs?

I normally use Ctrl+PageUp and Ctrl+PageDown to switch tabs in Vim. But when running Vim inside GNU screen, they don't switch tabs and instead have the effect of switching case. I am running the ...
46
votes
3answers
7k 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 ...
1
vote
2answers
164 views

Start a few programs in a split terminal

I want to start a few programs with a single launch script and monitor their outputs to the console. The easiest way would be to launch in background an xterm for each program, but that's not very ...
2
votes
1answer
2k views

Horizontally split-screen with two programs?

I have two programs A and B. I want a single command, which will run Program A and Program B in two different terminals but in the same tab, i.e, in a horizontally split terminal. I know screen can do ...
8
votes
4answers
4k views

How to run a second command in same screen session

I'm starting the first command in screen like this: screen -d -m -S testen -t lalala watch df -h which gives me a screen session running in the background and I can reconnect at a later time. How ...
0
votes
0answers
29 views

GNU screen - open new window in working directory of current window in a named (sessionname) session?

In order to open a new screen window in the same directory as the current working directory of the screen window you are launching it from (rather than the directory you initially launched the screen ...
0
votes
1answer
36 views

Backup MySQL, using Screen and Crontab

I'm trying to backup my database's table every day, using mysqldump, screen and crontab. If I run only mysqldump, it dumps correctly, but if I do it trough screen, the output file is blank. Editing ...
38
votes
3answers
29k 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. ...
0
votes
1answer
49 views

GNU Screen hangs in ConEmu

I just did an update of Cygwin on a Windows 7 box. When I open ConEmu to a Cygwin Bash terminal, everything seems fine. However, if I run GNU Screen, the terminal locks up until I forcibly kill ...
1
vote
1answer
25 views

Does GNU screen issue signal 28?

Bit of a long shot... I'm executing a long-running process that takes several hours. The process is the re-indexing of the CDDB database's fuzzy matching file. The process keeps quitting after a ...
0
votes
0answers
7 views

Exiting copy mode in GNU screen takes too long when tailing

Start screen, and run a command that tails a frequently-updated logfile, or a command akin to this: while true; do date; sleep 1; done Now hit CTRL+a+ESC to enter copy mode. Scroll around or ...
3
votes
3answers
2k views

Use of screen on terminal is blocked by length of user name

I am a user of screen on terminal, but i tried to mount a screen on my Macbook and results in this warning: $ screen LoginName too long - sorry. I read on web and the suggestion is change the ...
0
votes
1answer
57 views

Can't open display after reattach screen session

When I first start my screen session my X-display works. I.e., I can start X-apps like xterm, etc. However, when I reattach my previous screen session, from a different X, the X-display no longer ...
0
votes
1answer
36 views

Moving from screen to tmux but having trouble in copying (double click doesnt work in tmux)

While in putty double clicking a word copies it to clipboard, I am unable to copy by doubling clicking when I am using tmux in putty. I am able to do it using SHIFT key, but I want to do it without ...
0
votes
1answer
123 views

How can I send keyboard input into a GNU screen session without attaching to it?

I need to send keyboard input to a GNU screen session without attaching to it. I have tested this example but it does not work: screen -S ffa3 -X "say SERVER REBOOT IN FEW MINUTES" No I am also ...
96
votes
7answers
46k views

tmux vs. screen

I'm about to get back into using GNU 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, ...
10
votes
1answer
313 views

How to disable alternate buffer in GNU screen itself but not for vim, less inside it?

What I would like to accomplish is mouse wheel scrolling behavior that I'm used to in a regular ssh session. In bash prompt mouse wheel should scroll my terminal output, and inside less/vim - the ...
0
votes
1answer
83 views

How to switch to an existing vim instance from inside of screen when opening a file twice

When i work on many files with screen and vim, often i try to open a file already open.. I must switch manually between screen windows witch ctrl-space and press ctrl-g until i find the right window. ...
-1
votes
1answer
42 views

How do I create a new blank window in screen when I have multiple sessions running?

I'm running multiple concurrent screen sessions for a variety of projects. I'm attached to one and issue the command (Ctrl-A c) to create a new window. It creates the window, but strangely, it's a ...
2
votes
1answer
2k views

How to correctly set GNU Screen to display currently running program in hardstatus

In bash, to display the name of the current program in the GNU Screen hardstatus line takes only two configuration lines. First, tell screen what the end of your prompt normally looks like, and supply ...
0
votes
1answer
306 views

Run hardcopy on a specific screen window

I'm trying to run screen to connect to a serial port. I want it to run a command, and then every 60 seconds I want to use hardcopy to write which is shown to a log file. So far I've done this: ...
0
votes
0answers
9 views

gnu-screen scrollback mode documentation for whether it blocks execution?

I saw in this answer that gnu-screen's scrollback mode blocks execution because gnu-screen "blocks the output pipe". Where is the official documentation for gnu-screen's scrollback mode behavior ...
15
votes
3answers
5k 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 ...
0
votes
1answer
32 views

How do I save my screen GNU session?

I am trying to use a GNU screen session to go through a long code line by line to debug. I'm working in it through a shell. I start the screen with screen -S Name. Normally I run a few lines of ...
10
votes
2answers
2k 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 ...