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

How to control GNU screen's blocking behaviour

Why does GNU screen, when set to Copy Mode, sometimes block the inner process(es), yet other times it does not? For example, the following bash one-liner is not blocked by Copy Mode: while ((1)) ; do echo $i; i=$((i+1)); sleep 0.1; done If you run…
davidA
  • 12,528
  • 9
  • 64
  • 96
0
votes
1 answer

LINUX Get screen content into file

OS Centos 6.9, I've made a new screen session for a CSGO Server by using this command : runuser -l '.$username .' -c "cd /home/'.$username .'/'. $username .'-'. $port .'/ && screen -A -m -d -S Server'. $port .' ./srcds_run srcds -game csgo -console…
anar chiff
  • 13
  • 8
0
votes
1 answer

Stop script | Spigot | Reatach to a detached screen

I am trying to make a minecraft server for a while and I have a little problem with a stop script. My startup script ( i want to mention in , just in case of something ) looks like this: #!/bin/sh screen -S server java -Xms2G -Xmx2G…
Michael
  • 29
  • 5
0
votes
1 answer

How can I write a shell script that goes into a screen and invokes something?

My IRC bot sporadically dies sometimes and I have it in a screen. The way to invoke it again is node protobot.js. I have to always find that screen and reinvoke it. I'd like a faster way. How can I invoke screen reliably from within a shell script…
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
0
votes
1 answer

send SHIFT+H keystroke to screen

I have a running process that I've started with screen. I want to enable log file "on the fly" sending CTRL+a SHIFT+H from a script: screen -dr process -X stuff ^A H , screen says --> -X: stuff: invalid option screen -dr miner -X stuff "^A H" ,…
Fer Nando
  • 7
  • 2
0
votes
2 answers

Launching a Perl script without output

I'm making a script (Perl or shell) that launches a second Perl script. The script that it's launching has thousands of lines of output. So basically I want to make a script that launches another script without any output - and if possible run it…
Jon
  • 2,932
  • 2
  • 23
  • 30
0
votes
2 answers

How to run a script hourly that requires password?

I want to call a script every hour which I was doing by using following commands: Step 1. Connect to your cloud desktop using ssh. Step 2. Run these commands: % screen % while true; do ./parseScript.sh; sleep 3600; done Step 3. Close the window with…
user6438693
0
votes
1 answer

Use "screen" with a display

I'm using Matlab on a Unix server and would like to be able to keep a session opened (with Matlab windows still displayed) on a screen so that I can get back to it whenever I want. One solution I found that may work is using "altscreen" and set it…
oz380
  • 57
  • 3
  • 9
0
votes
4 answers

How to redirect python print to a file while running it inside a screen session

I have a simple python script test.py: from __future__ import print_function print("Hello") I try to redirect the printing to a file, inside a screen session. The following things work: Without screen: python test.py > out.txt With screen, step by…
BlueSun
  • 3,541
  • 1
  • 18
  • 37
0
votes
1 answer

Detach and reattach a complete Screen session with multiple windows

I am writing a client/server-application and when I'm testing the code I want to be able to have both the server and client in a separate terminal (+ vim). For this I thought I could use GNU Screen and divide the terminal in multiple windows (and it…
RobertN
  • 3
  • 1
0
votes
1 answer

Linux screen command, auto renamed on CentOS 7

I use screen to login multi terminal. The best way I use screen is that I can name(control + a + A ) a screen to tell which machine I am logging. But on CentOS 7, the name I typed was auto changed to the command I just type. Such as I was logging a…
Jack Gao
  • 1
  • 1
0
votes
1 answer

How to create window next to current one in GNU screen?

I want to change to the new window with C-a n. So How to create window next to current one in GNU screen? If GNU screen can not do that, is there a alternative recommended?
Big Shield
  • 612
  • 5
  • 15
0
votes
1 answer

How to use tabs with vim in the Linux "screen" program?

When I use the Linux screen program, pressing the tab key will move between multiple screen windows. But when I want to press Tab to add blank space in a file using vim, it is useless, and will move to another screen. How can I use Tab with vim in…
0
votes
1 answer

Ubuntu Cron Job Screen

I am trying to run a program that runs this line of code in screen livestream_dl -u "..." "..." And it then starts a process of checking if an Instagram Live video is being active then Downloads it if it can find it and if not the screen…
Haroon Baig
  • 53
  • 1
  • 9
0
votes
1 answer

Trouble with launching node inside a screen session via PHP

So to start; I am trying to launch a node application via PHP. I created a script that can check if the node application is running, close it and start it. But I have some trouble with using screen with PHP. Now before I carry on, comments about how…
Dahknee
  • 591
  • 3
  • 12
  • 28