Questions tagged [gnu-screen]

screen (GNU Screen) is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Before using this tag, read the "Which site is more appropriate?" section of the tag wiki.

screen (GNU Screen) is used to create virtual terminals, which run by their own when not under direct user control. This is especially useful while working with a remote system, when a disconnect can occur at any moment. In this case, the screen session will continue to execute and you may reattach a running screen later.

Screen also allows you to execute multiple commands in a single terminal without losing control over them.

One additional trick is that a single virtual screen can be used by several users simultaneously, allowing them to guide and observe actions of each other.

Which site is more appropriate?

If you intend to tag your question with this tag, consider if the question is more suitable for other Stack Exchange sites:

1022 questions
42
votes
6 answers

Checking if a Screen of the Specified Name Exists

I have made a bash file which launches another bash file in a detached screen with a unique name, I need to ensure that only one instance of that internal bash file is running at any one point in time. To do this, I want to make the parent bash file…
Zoey
  • 2,391
  • 2
  • 22
  • 28
41
votes
7 answers

How to create a screen executing given command?

i'm fairly new in *nix. Is there a way to create a screen, which will immediately execute a given command sequence (with their own arguments)? Two hours of googling yields nothing - perhaps because I can't clearly state the question. I hope for…
Alex Abdugafarov
  • 6,112
  • 7
  • 35
  • 59
41
votes
5 answers

screen Cannot open your terminal '/dev/pts/0' - please check

I want to start a program in a screen as the user "XYZ" with a script. This is my script in short form: # replace with the user you wish to run teamspeak 3 with. USER="teamspeak" # Do not change this…
LFS96
  • 856
  • 1
  • 12
  • 23
38
votes
3 answers

Is it possible to name the 'screen' logfile from the -L flag?

Upon running Screen with the -L flag, a file called 'screenlog.0' is created and all output written to it (which is great), but I will be running several Screen sessions and I need to identify the logs with a unique number. Is it possible to change…
Justin
  • 808
  • 1
  • 7
  • 15
36
votes
7 answers

How to clear the scrollback in the screen command?

I use the screen command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don't want it sitting there anymore?
Liu Chang
34
votes
2 answers

How to automatically refresh gdb in tui mode?

If I'am debugging files with gdb -tui the source window always becomes messed up. So every time I hit enter I have to immediately type ctrl+L to get rid of this problem, this is how gdb refeshes the window. I am working on tty with gnu screen. Is…
John Goofy
  • 1,330
  • 1
  • 10
  • 20
34
votes
8 answers

How do I display the current "session" name or "sockname" of a screen session in the status bar?

I run multiple screen sessions each created with 'screen -S name' and I would like to be able to display in the status bar the name I used to create the current screen session. However, I cannot seem to accomplish this. Any ideas?
Neg_EV
  • 1,930
  • 1
  • 15
  • 23
33
votes
4 answers

How to toggle CR/LF in gnu screen?

I'm using screen to read the text from a serial console. The problem is the output seems to only have newline \n but not carriage return \r, so the display looks like this... Line1 Line2 Line3 I wonder if there is any patch to fix…
Patrick
  • 4,186
  • 9
  • 32
  • 45
33
votes
1 answer

Multi-Session Manager for Git Bash Like GNU's Screen

I'm not sure what to name this question, as I am not sure what the technical name is for the type of program I am talking about. Is there a program available for Git Bash that is similar to screen, tmux, or byobu? I know all 3 are available for…
trysis
  • 8,086
  • 17
  • 51
  • 80
32
votes
1 answer

nohup vs screen -- which is better for long running process?

Background: I have a long running script that makes database schema changes that has output I would want to check after the migration. I would want to write this to a file. I have been reading stack overflow about nohup and screen. I have tried both…
Chris Muench
  • 17,444
  • 70
  • 209
  • 362
31
votes
3 answers

tmux man-page search highlighting

When I search in, for example, man ls while in a tmux session, the search strings don't appear highlighted - the page jumps down so that the search string is on the top line of the buffer, as expected, but it's not highlighted. Doing the same thing…
simont
  • 68,704
  • 18
  • 117
  • 136
30
votes
7 answers

gnu screen - changing the default escape command key to ALT-X?

In GNU screen, I want to change the default command binding to Alt-s (by tweaking .screenrc) instead of the default C-a, the reason is I use emacs hence GNU screen binds the C-a key, sending "C-a" to the emacs becomes tedious (as @Nils said, to send…
Siva
  • 711
  • 1
  • 5
  • 8
29
votes
2 answers

Send command to all window in tmux

Is a way to send the same command to all window in tmux, not to all pane in window. synchronize-panes - send command to all pane in one window. I need something like 'at' in screen.
vorand
  • 291
  • 1
  • 3
  • 3
29
votes
1 answer

grab last n lines from console output

I want to make a shell script that will effectively grab the last n lines from sterr and stin that were outputted to the console. I have a screen session running a process that will restart it if it crashes via a hacky infinite…
Hersheezy
  • 1,174
  • 1
  • 10
  • 17
28
votes
5 answers

Working with vim on multiple monitors

I have three monitors. I normally run one maximized xterm on each monitor, attached to the same GNU screen session. Can a similar model be used for vim? Is it possible to have three vims running, all sharing the same "vim session": Each vim window…
codeape
  • 97,830
  • 24
  • 159
  • 188
1 2
3
68 69