Questions tagged [gnu-screen]

screen (GNU Screen) is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). For computer monitors, see the tag /monitors.

156
votes
9answers
107k views

How can I disown a running process and associate it to a new screen shell?

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back. One way I thought of doing that was to transfer its ownership to a screen shell, ...
204
votes
8answers
156k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
44
votes
3answers
57k views

sending text input to a detached screen

I'm trying to run a minecraft server on my unRAID server. The server will run in the shell, and then sit there waiting for input. To stop it, I need to type 'stop' and press enter, and then it'll ...
48
votes
3answers
160k views

how to output text to both screen and file inside a shell script?

Currently I have a shell script which logs messages to a log file like this: log_file="/some/dir/log_file.log" echo "some text" >> $log_file do_some_command echo "more text" >> $log_file ...
31
votes
2answers
24k views

Prevent GNU screen from terminating session once executed script ends

I'm trying to force GNU screen to create a "virtual" terminal, without attaching to it, execute script inside and NOT terminate session once script ends. I tried many combinations, including: screen ...
255
votes
9answers
467k views

How to split the terminal into more than one “view”?

From vi, if you issue the command :sp, the screen splits into two "views", allowing you to edit more than one file from the same terminal. Along those same lines, is there a way to have multiple ...
68
votes
3answers
59k views

Shell: how to go to the beginning of line when you are inside a screen?

I am inside a screen (screen -Ra). I have a long command, and I am at the end. Instead of keeping the left arrow, how can you go to the beginning of the line? CTRL-A works when I am in a normal ...
192
votes
10answers
57k views

tmux vs. GNU Screen [closed]

Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.
18
votes
1answer
8k views

Sending input to a screen session from outside

My scenario is this: I have a screen session running in a remote location. Inside this screen is a consoled-based program. When run without screen, this program starts in the terminal and accepts ...
20
votes
2answers
11k views

Is there a way to make Screen scroll like a normal terminal?

I love screen, but it drives me nuts that I have to stop typing input, hit CTRL+A [, and then find what I need. Is there a way to make the scroll wheel function normally, rather than scrolling ...
17
votes
2answers
9k views

GNU screen: print a detached session to stdout

I just want to have a quick overview of my detached GNU screen sessions. Is it possible to dump the current content to stdout ? Something like screen --print SESSION_NAME > file.txt
7
votes
2answers
5k views

Why is screen seemingly doing nothing with commands passed with -X?

I've been trying to set up an automated backup system for a minecraft server, and I'm having trouble with screen, specifically when using 'screen -r sessionname -X "/var/minecraft/somebatchfile"', ...
5
votes
1answer
223 views

How to make a comprehensive set of possibilities for defining GNU-screen “command characters”?

I want to somehow generate a comprehensive "menu" of all possible ways to set up the GNU-screen "command characters" for a standard, off-the-shelf "US keyboard" and a specific terminal emulator, say ...
30
votes
4answers
19k views

Save complete GNU screen session state

Is it possible to persist the "state" of a GNU screen window (or just a standard shell) so that I can reload everything after a reboot: The number of opened shells The name of each shell The current ...
17
votes
2answers
34k views

How can I switch between ttys without using screen?

So let's say you boot up your Linux install all the way to the desktop. You start up a gnome-terminal/konsole/whatever so you have a tty to enter commands to. Now let's say I SSH into that same ...
9
votes
2answers
4k views

Force title on GNU screen

By default, the title of a screen session is the name of the last command entered, which is fine for me, but in some cases I'd like to change it. I know the command Ctrl-A A, but it only changes the ...
9
votes
3answers
4k views

How to screen'ize already running session? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? It is a good practice to run long processes in screen session, to protect them from session hangups. ...
5
votes
1answer
990 views

How can I add the session name to my screen status display?

This is my current .screenrc files which is mostly copied from the link in the code #First iteration 2014-09-06, not quite sure of stuff to add # got a fancy hardstatus line noted below hardstatus on ...
1
vote
2answers
413 views

Why do you need screen/tmux to keep a remote program running

When I ssh to a server and start a script that is supposed to run for several days, it stops executing some time after I log off. Why? I suppose the server runs 24/7. And what does screen/tmux do to ...
115
votes
4answers
31k views

How do you detach the 2nd screen from within another screen?

I've accidentally attached to a 2nd GNU screen session from within an existing screen session and cannot detach or issue commands to the inner screen. I remember figuring out how to do that before but ...
35
votes
4answers
23k views

Is there an equivalent of GNU Screen's “log” command in tmux?

I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an ...
16
votes
8answers
2k views

Is screen useful?

When I need to open different processes or terminals that I need to check, I just open a new tab in my terminal and use different workspaces in my machine to keep everything organized. I do some web ...
11
votes
4answers
3k views

Can I easily search my history across many screen windows?

My current screen session has 12 open windows on it. It's been running for weeks... I know I executed an ImageMagick convert command in one of these 12 screen windows sometime last week... is there ...
21
votes
4answers
34k views

Send file by xmodem or kermit protocol with GNU screen

I work with an RS-232 device via GNU screen. $ screen /dev/ttyUSB0 115200 At some point I need to send a local file to the device using either the xmodem or kermit protocol. On Windows I use ...
23
votes
3answers
79k views

Run script in a screen

I want to run a bash script in a detached screen. The script calls a program a few times, each of which takes too long to wait. My first thought was to simply open a screen and then call the script, ...
8
votes
1answer
16k views

Sharing a terminal with multiple users (with screen or otherwise)

I am setting up a server where there are multiple developers working on multiple applications. I have figured out how to give certain developers shared access to the necessary application directories ...
5
votes
1answer
4k views

How to run streamripper and mplayer in a split-screen X terminal, via a single script

I want to run streamripper in its own X Terminal (window), then split the terminal horizontally, and then run mplayer in the lower half. This is simple enough to do manually, but getting a script to ...
10
votes
1answer
887 views

Prevent Logoff from Killing tmux Session

I have noticed that a logoff (log out) from my X user session will kill any tmux session I have initiated, even sessions I had run with sudo tmux and similar commands. I am sure that this formerly did ...
4
votes
2answers
6k views

How to enable Control key combinations for GNU screen on putty?

I am accessing a linux box via ssh using putty. Key combinations work fine when I'm not running screen. However, Ctrl key combinations do not work under a screen session. In fact, a Ctrl-any key is ...
2
votes
2answers
3k views

How can I keep processes running on a remote server even after turning off the terminal machine?

..and then still be able to return to the same session/screen after restarting the terminal machine. I've tried screen but once I restarted my computer screen -d showed no sessions. Nohup seems to be ...
12
votes
3answers
5k views

How to allow Page Up in GNU Screen?

I use Vim to edit text files on Linux. Commonly I connect to remote Linux machines using PuTTY from Windows. I use GNU Screen commonly as well. When using Vim inside Screen I am unable to use the ...
10
votes
1answer
4k views

GNU Screen doesn't echo unicode characters correct

When I do this in my terminal: echo -e "\xF0\x9f\x8d\xba" I get a cool beer mug in my terminal: 🍺 However, when I start screen, and try the same, I'm getting a �. How do I get the nice beer mug? ...
6
votes
2answers
10k views

Log output of GNU screen in real time?

I'm trying to get the output of a GNU Screen to a log file in real time. I've tried using tee, but that appears to not work with screen. The log function for screen will not work for this as it is not ...
5
votes
1answer
713 views

Tmux viewport caused by multiple concurrent sessions

When attaching to the same tmux sessions from multiple computers using ssh and tmux attach, my screen looks like: ------------------------- $> |........ |........ ...
4
votes
1answer
358 views

How can I do logging of every screen sessions

I am using screen utility for couple of years. I just simply love it. In cloud machines I do have multiple screens as I work with a team. I want to log every commands that have been run in every ...
2
votes
2answers
2k views

screenrc: find out the keys bound by bindkey

The bindkey keyword in .screenrc is preceded by some cryptic keys that correspond to some keybouard binding. How can I figure out what these are? Google and GNU Screen Documentation did not show the ...
1
vote
1answer
372 views

Create a screen, launch a command in it and detach

I'd like to do a one line bash command that automatically does this: screen -S myserver python myserver.py # inside the new screen CTRL A, D (detach) I think this won't work: screen -S myserver &...
1
vote
1answer
1k views

How to prevent GNU screen from clearing the screen when terminating?

When I run $ screen id all I can see is [screen is terminating] message in the top of the screen. What I want to see is the output of the id command and the [screen is terminating] message. I can ...
5
votes
2answers
13k views

How to change (increase) number of lines in screen?

Connecting from Windows to Linux (CentOS 5.4) using PuTTY. Console set at 140col 60 lines. Not much else changed from default. Connection is via serial cable to the box. On Linux, installed and ...
1
vote
1answer
232 views

Clear to end of line uses the wrong background color in screen

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works. We see it in the grey bar going all the way across. However, if I call "screen", the %E stops working: ...
344
votes
4answers
285k views

Scroll inside Screen, or Pause Output

I use screen for my command-line tasks while managing the servers where I work. I usually run small commands (mostly file-system tasks) but sometimes I run more extensive tasks (like DBA). The output ...
72
votes
4answers
118k views

How to split window vertically in GNU Screen?

I saw some body split their window to 2x2, I just want to know how to do that? I know the 'split' command in Screen can only split the window horizontally.
79
votes
4answers
131k views

How to recover a 'lost' screen session?

Somehow I managed to close a screen window without screen 'noticing' it, so the session is still flagged as attached. This prevents me from re-attaching to this session. What can I do? me@iupr-serv8:~...
53
votes
5answers
27k views

Can mouse wheel scrolling work in a Screen session?

Is there any way to use the mouse wheel to scroll through the output of a screen session? I can use the keypad scroll through previous output in screen after pressing ctrl+a [. Is it possible to do ...
32
votes
3answers
24k views

Force GNU screen to reflow to current terminal width on reattach?

I would like to force GNU screen to reflow to the existing terminal width when I reattach a session. It seems to me this worked properly before I upgraded a machine to CentOS 6, but I cannot figure ...
29
votes
1answer
21k views

How to open tabs windows in Gnu-screen & execute commands within each one

when starts session named any name like this screen -S name1 i want to open tabs windows in this screen session like when open tabs in gnome-terminal like this gnome-terminal --tab -e "some commands"...
39
votes
5answers
52k views

How do I cycle through panes inside a window in tmux like in screen?

I thought Moving tmux pane to window was the same question but it doesn't seem to be. Coming from using GNU screen regularly, I'm looking for tmux to do the same things. On of the things I do ...
29
votes
5answers
93k views

search text on the terminal output

I am running an application with command $ grails run-app which prints log in terminal like below. What I want is search a particular text (say user authorities) in this log so that I can verify ...
19
votes
5answers
44k views

tabs when using 'screen'

I am using Ubuntu 10.04. After I installed screen: sudo apt-get install screen I made two ssh connections to two remote servers by doing the following things step by step (I do the following steps ...
19
votes
2answers
9k views

GNU Screen: new window name change

I can change the name of a window with Ctrl-a Shift-a. Instead of editing several window names by hand, is there a way to have them automatically named after the current directory?