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

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

I would like to write a shell script/rc file that automates GNU Screen splits and starts programs within them

I would like to automate a scenario when I am working on a rails project, and I think screen is the perfect way to accomplish this without having to drag and drop multiple windows after every startup ...
1
vote
0answers
221 views

Running emacs in GNU Screen overrides .emacs settings for [home] key binding in FreeBSD 8.2

If I use the following .emacs file, I am able to go to the beginning/end of the current line using the home/end keys as I would expect. (keyboard-translate ?\C-h ?\C-?) (add-to-list 'load-path ...
1
vote
1answer
740 views

Screen and SSH Tunnel - How can screen session possibly die?

When I start my xsession I setup my SSH tunnel to my VPS. Here is the script the runs on login: matt@HY731AA:~$ more dotfiles/startssh.sh #!/bin/sh ssh-add ~/.ssh/id_rsa screen -dmS ssh /bin/bash ...
2
votes
1answer
963 views

screenrc: How to map “alt+number” to “select a screen window” in gnome terminal

I found this online: bindkey "\261" select 1 bindkey "\262" select 2 bindkey "\263" select 3 .... Basically it maps alt+1 to "select 1"; alt+2 to "select 2". So when you press alt+1, it is ...
2
votes
3answers
165 views

putting screen away?

I've just installed screen, what a great tool! But i'm having some problems. CTRL-A K kills a screen CTRL-D detatches from a screen but what are the difference? both results in loosing the screen? ...
1
vote
2answers
664 views

Pipe screen buffer to another command?

I can't seem to find anything on this so, is there a way to pipe everything from a screen window into another command. I have a server running in screen (not the best idea, but the only way for the ...
3
votes
3answers
616 views

In 'screen' (linux utility) windows, where is the .bash_history of individual windows?

I am using the linux-utility 'screen' (I mean the terminal multiplexer). In each "window" of screen, I am running bash. But these bashes do not seem to have any command history. For example, if I ...
1
vote
2answers
994 views

Debian: Kill a Screen session through the web

I have php code that is as follows (kill.php): <?php echo exec("/home/duke/aa/scripts/test.sh"); ?> test.sh looks like this: screen -S server -X quit If I run the php code in the terminal ...
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 ...
6
votes
2answers
2k views

GNU Screen: Can't stuff commands unless the screen is attached?

I have the following script screen -d -m -S $1 #start screen minimized screen -S $1 -X stuff "$beast " #stuff commands unless I attach the screen ...
1
vote
2answers
1k views

Using screenrc, how can I make `C-a c` open a new window at the current window's working directory?

Using screenrc, how can I make C-a c open a new window at the current window's working directory? By default it appears to open the new window at the working directory at the time the original screen ...
1
vote
0answers
185 views

$HOME is forgotten only when a remote SSHed “screen” session is detached

Whenever I detach my remote "screen" session and ctrl a-c a new window, it opens the new window with "/" as the PWD. Another extremely annoying problem is that whenever the "screen" session is ...
1
vote
2answers
978 views

Use screen to execute command from commandline

Is there a way wherein we can start a screen, execute a command and detach it without actually entering into the screen? something like screen -[some option] [command tobe executed] I need this ...
0
votes
1answer
314 views

Define a new “Ctrl-a <key>” shortcut in GNU screen?

I want to be able to hit Ctrl+a (or whatever my command sequence is) followed by a lowercase k rather than the uppercase one that screen defaults to. I've played around with the bindkey directive a ...
4
votes
1answer
244 views

Disconnect process from Linux console

I have a long-running process that was started in bash terminal on Debian. Unfortunately it wasn't started inside screen. Is there a way to disconnect this process from current console and connect to ...
5
votes
4answers
2k 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 Now I have a screen session running in background and I can reconnect at a later time. But how can I ...
0
votes
1answer
396 views

convert screen hardstatus to tmux

I'm a longtime screen user, but the move to tmux is growing inevitable. I have a fairly large .screenrc that I am working toward porting to tmux (I'd like the bulk of my existing workflow to just ...
5
votes
1answer
2k views

How can I make window list in GNU Screen appear always ( C-a, C-w)

How can I make window list in GNU Screen appear always ( C-a, C-w) ( permanently )
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?
45
votes
6answers
24k 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
396 views

Run a command in GNU Screen when the window changes

Is it possible to execute a screen command when the user changes the window? I have my current working directory in my hardstatus by using zsh's precmd() feature to change screen's working directory ...
3
votes
2answers
1k views

How can I keep the tmux prefix key pressed between commands?

In GNU screen, I can keep Ctrl+a pressed in between commands. For instance, to change windows I keep Ctrl+a pressed and just keep pressing n without releasing Ctrl+a. Is this doable in tmux? ...
1
vote
1answer
141 views

Do each application need to support writing to /dev/stdout or /dev/fd1 or is that handled transparently by the OS?

I tried this command to print the buffer of an existing screen session to stdout but I don't know why it doesn't print anything. screen -x lftp -X hardcopy /dev/fd/1 screen -x lftp -X hardcopy ...
1
vote
1answer
299 views

bash does not recognize alt+backspace command

I use bash and alt+backspace key to delete a word at a time. This works nicely, but for some reason, it stops working after a while. It seems as though it does not recognize the alt key, and simply ...
2
votes
1answer
2k views

Send command to another user's screen terminal

I have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2. Suggestions? Thanks Max
1
vote
1answer
577 views

How do detatch and reattach a x-forwarded ssh-session?

i have a linux-server and would like to run linuxdcpp (linux dc++) on it. for that I need to create a ssh connection with x-forwarding like: ssh user@server -X Then I need something like screen to ...
4
votes
4answers
2k views

start gnu screen automatically

I want to start gnu screen automatically when I login to my remote machine via ssh, so I add exec screen to the end of the .bash_profile file, then I find out that when I terminate the screening, ...
2
votes
1answer
91 views

sharing emacs killed text with gnu screen

I'd like to automatically have text I kill in emacs get put into screen's clipboard. I don't care too much about travel the other direction. I can do it now via a temporary file, but I have to run a ...
23
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 ...
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 ...
7
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
3answers
393 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". ...
0
votes
2answers
1k views

How to switch between Linux virtual terminals over serial?

How do you switch between Linux virtual terminals over a serial terminal connection? I'm trying to install Debian on a Beagleboard via the serial console. I'm using screen (screen /dev/ttyUSB0 ...
4
votes
2answers
4k views

Gnu screen, how to update dynamically the title of a window?

I'm trying to improve the aspect of GNU Screen using the screenrc file, I tuned colors, status line, caption and the list of the loaded windows. The only thing I'm not able to achieve is getting the ...
1
vote
2answers
106 views

keyboard shortcut for pasting in gnu screen

how can I paste the text in my system clipboard using screen over an ssh connection with Putty?
25
votes
2answers
13k 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. ...
1
vote
1answer
382 views

Bash profile script order in screen

I have put an echo in three profile scripts that shows the file name so that I can see the order they run. When I log in I see. /etc/profile /etc/profile.d/color-ls ~/.bashrc /etc/bashrc $ alias ls ...
1
vote
1answer
135 views

How to have different settings for each window in GNU screen?

Can I use different color setting (foreground and font) for each of the window that I create?
1
vote
1answer
263 views

libreadline history lines combine

This has been driving me crazy for about three years. I don't know how to fully describe the problem, but I think I can finally describe a way to recreate it. Your milage may vary. I have a mixture ...
18
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 ...
1
vote
2answers
472 views

In GNU Screen, Recalled bash history command displays one character position to the left of actual location

I am running Red Hat 5 32-bit (2.6.18-194.26.1.el5). The issue is that when I recall any previous command in bash's history, the first character in the command is displayed immediately after the ...
2
votes
4answers
3k views

is there a way to save what's printed on the display with gnu screen?

I like to save everything I do on the command line, for example when I upgrade something and want to read back how the upgrade went etc.. Usually with Mac OSX and Terminal you can scroll back as much ...
1
vote
2answers
577 views

GNU/screen not setting $STY

I'm trying to script the spawning of GNU/screen windows by using commands of the form screen <CMD>. For some reason when I start GNU/screen (by hand), the shell that it starts in window 0 ...
2
votes
0answers
314 views

Hibernating/Saving state of a gnu-screen, to resume after reboot? [duplicate]

Possible Duplicate: Make GNU screen survive reboot Is it possible to hibernate or save the current state of a gnu-screen to resume after reboot?
4
votes
3answers
1k views

LD_LIBRARY_PATH unset by screen

Running screen in bash wipes the variable LD_LIBRARY_PATH. I've done some reading and it seems that this is expected behaviour, but I need to get around it. The workaround is adding the ...
2
votes
2answers
394 views

New serial window in GNU Screen

I know that I can launch Screen as a serial port terminal from scratch. What I want to do is to create a new window inside an already running screen session as a serial terminal. so that I don't need ...
0
votes
1answer
1k views

GNU Screen: «unknown command 'vert_split'» though C-a | works

in GNU-screen (4.00.03jw4 FAU 2-May-06) I'm able to perform a vertical split pressing C-a | (i.e. Ctrl+a, then pipe). Since I'd like to have the screen vertically splitted at the program startup, I ...
8
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. ...
1
vote
1answer
648 views

How can I keep gnu screen from becoming unresponsive after losing my SSH connection?

I use a VPN tunnel to connect to my work network and then SSH to connect to my work PC running cygwin. Once logged in I can attach to a screen session and everything works great. Now, after a while, ...