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

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 ...
0
votes
1answer
21 views

Automating VPN launch

I've recently set a VPN connection up, between my home computer (Ubuntu 14.10) and a dedicated server (Debian 7.7), using OpenVPN. So far so good. My question is, how would you go about simplifying / ...
1
vote
0answers
23 views

Screen window title using zsh

I would like to make vim screen tabs name more useful. I've turned on the screen plugin, and tried several approachs. One that I would enjoy most was to make the screen name fixed using another load ...
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 ...
0
votes
0answers
19 views

Screen copying (preferably moving) to another server

I have a screen on a server machine and want to transfer it to another machine which has the same file system configuration (and possibly same hardware). Is it possible to transfer the screen to ...
0
votes
1answer
19 views

How to append to screen buffer file?

If I have multiple log files open in several screens and I want to copy all useful traces to a single file, I initially copy them to the screen scrollback buffer file. Doing ">" after selecting text ...
6
votes
3answers
2k views

Mac Gnu-Screen doesn't load default .bash_profile

I have a bunch of custom settings in my bash_profile. when I use gnu-screen, I realized that my screens do not execute source /Users/disappearedng/.bash_profile. I try to put source ...
4
votes
1answer
767 views

“screen is terminating” for non-root

When I try to run screen as a non-root user I get: screen [screen is terminating] immediately, though it works fine for root ls -alh /usr/bin/screen -rwxr-sr-x 1 root screen 465K Jun 9 20:30 ...
1
vote
2answers
140 views

GNU screen changes vim syntax highlighting colors

I am trying to use vim inside a GNU screen session, but whenever I open vim inside screen the syntax highlighting uses completely different colors when compared to when I open vim outside GNU screen. ...
0
votes
0answers
36 views

How to prevent terminal bell from going off when exiting vim from within a nested screen session

My vimrc file contains the following lines to set the window title start and end strings respectively. When I enter a vim session and my konsole terminal is either outside of screen or within a ...
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. ...
1
vote
1answer
11 views

tmux multiple instances of the same session

I've recently converted from gnu-screen to tmux. I am struggling with 1 thing. My workflow is something like this. I create a session for each "task" I am doing at any point in time. That way I can ...
1
vote
1answer
255 views

How do you resize a split window in gnu screen to maximum?

While in gnu screen for linux, how do I resize the current window to full screen? <ctrl-a> a :resize max does not work.
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 ...
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 ...
2
votes
3answers
97 views

How to open one GNU screen tab for each directory in a list

I have the following script - it sort of works. #!/bin/bash ... define plugins, etc for plugin in ${plugins[@]}; do screen -t $plugin done Want I want it to do open gnu-screen and for ...
2
votes
2answers
11k views

how to reset /dev/ttyS0

I'm trying to connect to a Khepera robot using serial interface (running Scientific Linux 6.1) I used the command screen /dev/ttyS0 to communicate which worked OK, but then I wanted to close it and ...
4
votes
2answers
3k views

Remap Ctrl-A in GNU Screen

I have been using GNU screen for a couple of days and the CTRL-A navigation is beginning to wear on me. How can I remap this key combo and what are some common replacements for these keys? For ...
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 ...
1
vote
1answer
30 views

preventing vim from destroying screen's scrollback buffer

when not using gnu screen, vim exits without littering my scroll back buffer. It vanishes, and all i get is a new bash prompt. everything that was on the screen before starting vim is there. when its ...
5
votes
1answer
974 views

Tell GNU screen where to save the sessions?

My GNU screen stores its sessions in the /tmp directory. That means that after a reboot, all sessions are lost: $ screen -list No Sockets found in /tmp/uscreens/S-dehmann. How can I tell it to ...
1
vote
0answers
22 views

Get command output from detached screen

I am running a detached screen session, and running a command into it with screen -x, like so: screen -S $SESSION -X <command> This works fine, though I would like to be able to catch the ...
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 ...
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 ...
0
votes
1answer
19 views

Keep screen running after starting it with an alias and running some commands

I have a bash alias to move into a project folder, start screen, and pull new changes from git. it looks like this: alias start_manager2='cd ~/programming/manager2/ && screen -t "main" ...
0
votes
1answer
27 views

Why do i get a file named history in each folder in bash?

For some reason I get a bash history file in each and every folder where I issue any command. The file is called history rather than the normal .bash_history. My .bash_profile has the following that ...
4
votes
3answers
563 views

gnu screen - get list of window titles

How can I obtain information (title, created time, visible content) about windows in a screen session? I need to do this in a script, so I am not looking for key bindings or interactive commands. ...
0
votes
2answers
98 views

Correctly display the GNU screen session title in status bar

in GNU screen, I want the title of the session to be displayed in the status bar. It is working but not exactly as I wanted. I have the following backtick defined in my .screenrc: backtick 100 30 30 ...
5
votes
2answers
96 views

How to prevent gnu screen capturing the mouse?

I want to use local scrollback on my terminal, whilst using gnu screen. That's because my network connection is incredibly slow, so using screen's scrollback is very slow. Local scrollback is much ...
0
votes
0answers
61 views

how to show battery percentage on gnu screen hardstatus line

I currently have this as my hardstatus last line on gnu-screen the ~/.screenrc entry is as follows (just incase someone want something similar) hardstatus alwayslastline '%{= g}[ %{G}%H %{g}][%= ...
0
votes
0answers
63 views

Strange behaviour of vim inside of gnu-screen

I use screen a lot and inside one of my screen windows, I use vim a lot. I have, however, sometimes, some strange behaviour of vim: After a while of using vim and switching forth and back between ...
3
votes
1answer
863 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
2answers
410 views

How can bash screen be setup in the background and brought to the front later?

This a deeper explanation for the question. My goal is: Start a bash shell configured with a set of environment variables, but running in the background. Launch about five screen commands in the ...
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 ...
3
votes
3answers
2k views

automatically start screen upon ssh login

I have been reading about how to automatically start a screen when I ssh to a remote server. I would like a simple one-liner to add to my .bash_profile to start a screen when I ssh in, and NOT exit my ...
1
vote
2answers
2k views

how to remove a screen (detached sessions) in unix?

I have been working in different screen sessions in past projects , hence have a few screen sessions accumulated. Now i have been asked to remove excess/unrequired screen sessions from the unix box. ...
4
votes
2answers
409 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' ...
0
votes
1answer
61 views

Using GNU screen to create a split screen environment from command line

Could someone please point me towards the syntax for using GNU screen from the command line. On a previous cluster, I managed to create a bash script that would create X number of tiled shells, each ...
1
vote
1answer
71 views

How to give each virtual terminal in GNU Screen it's own background color?

I have a dream: I want each virtual terminal within GNU Screen to have it's own unique background color. I think I can fake it in an .bashrc script that emits xterm control codes to set background ...
1
vote
2answers
88 views

Running Screen after switching users

After switching users (with su) I cannot run screen: % screen -L Cannot open your terminal '/dev/pts/5'. How can I run screen after switching users?
1
vote
2answers
321 views

How can I set the parity bits when using screen to access a serial port

I typically use screen(1) to open a serial port with the command: sudo screen /dev/ttyUSB2 115200 I've tried setting parenb (and a number of other things) using the following command: sudo screen ...
0
votes
0answers
41 views

Get growl notifications from within a unix screen which is not in focus from a remote SSH session

Using iTerm2 I have growl notifications working within a (unix) screen session on remote servers when that window has screen's focus: My server's ~/.bashrc has: growl() { local ...
2
votes
1answer
65 views

Detaching from a GNU Screen suddenly clears the terminal

I feel so stupid for asking this, but here goes: I updated my Ubuntu (Server) install today from 13.10 to 14.04. Before the upgrade detaching from screen did not clear the terminal and now it does. ...
0
votes
1answer
27 views

Is there a way to send a screen command to a screen session “above” my current screen?

I would like to be able to send a screen command to a screen session "above" my current screen session (which is on another server). Imagine the scenario of starting an initial screen session and from ...
0
votes
1answer
57 views

How can I ring the audio bell within a bash script running under gnu screen?

In a konsole terminal window outside of screen running a bash shell with TERM set to konsole-256color if I type: echo -n $'\a' or echo -n $'\eg' or ./ringbell where contents of ./ringbell is ...
4
votes
4answers
10k views

How can I launch multiple screen sessions from a single bash script?

I've written a script (that doesn't work) that looks something like this: #!/bin/sh screen -dmS "somename" somecommand for i in {0..5}; do screen -dmS "name$i" anothercommand $i done For some ...
0
votes
1answer
49 views

How to determine if a screen is running jobs without attaching to it?

I wrote a zsh script that launches many screen sessions and runs a different command in each of them. When the script is executed there are 72 screens in total, so checking if a job is finished or not ...
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 ...
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 ...
4
votes
1answer
612 views

gnu screen and splitted regions

I just figured out that it was possible to have split terminals with gnu screen. But the problem is that it doesn't split windows, but create a new region which is always present. I'd like to be ...