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 use screen to issue a command in the background over an ssh session

I am used to using linux terminals and nohup over ssh to issue commands that run in the background even when logged out of the ssh session. For some reason nohup seems to be broken in the latest MACOS. For that reason I am trying to executing this…
Sohaib
  • 4,556
  • 8
  • 40
  • 68
0
votes
0 answers

nohup/cron/screen - Running script in backgroud - better option?

I have a PHP script which has a forever loop I need to run this script such that, even if I close my SSH session, it should always be running in the background. I know of…
SMG
  • 95
  • 1
  • 2
  • 11
0
votes
1 answer

How to check the reason of socket terminated

I am running a spring boot application on a linux server using screen. The application is running for approximately a few hours and then the socket is being unexpectedly terminated. When I log in again on the server and run screen -ls - I just get…
luke
  • 3,531
  • 1
  • 26
  • 46
0
votes
1 answer

How to immediately execute a command after creating a Screen?

Problem : After i create a screen : SCREENDIR=/home/scigirl/.screendir screen -S screenName I want to execute the command below automatically : source private/ProjetoMestrado/virtualenv-15.0.3/myVE/bin/activate -- Is this possible? If so ,…
KenobiBastila
  • 539
  • 4
  • 16
  • 52
0
votes
1 answer

try / except loop with bash terminal command as interrupt

I'm using a simple python.py script in Linux. I need to run a while/counter loop and would like to stop the loop immediately by using a/any terminal command. I need to run the script using Screen. Simply stopping the Screen session doesn't work - it…
0
votes
1 answer

gnu screen via putty split -v right display coming up on left side

We needed yet another screen question right? This one is only regarding VERTICAL Splits. Im on Trusty Tahr $ screen -v Screen version 4.01.00devel (GNU) 2-May-06 When i split vertically split -v, it appears to look normal. The right pane works…
blamb
  • 4,220
  • 4
  • 32
  • 50
0
votes
1 answer

linux can't access screens on crontab

I have created a bash file that executes a python script on an existing screen called 'cronscreen'. The bash file contains the following line: screen -S cronscreen -X stuff "python test.py$(printf \\r)" When I run the file from the command line, it…
Mister_L
  • 2,469
  • 6
  • 30
  • 64
0
votes
1 answer

linux executing command in existing screen

I have found that the following command is good for creating a new screen and running a shell command in it: screen -dmS newscreen -- sh -c 'date; exec $SHELL' However, what if I want to run the exact same shell command, but using an existing…
Mister_L
  • 2,469
  • 6
  • 30
  • 64
0
votes
1 answer

Create Linux Screen session and get its PID

I'm trying to create a PHP wrapper class around the Linux Screen utility. I need to be able to start a screen session by name and get back the PID of the screen that was created. I cannot assume the session name is unique so it can't parse the…
Bradley Odell
  • 1,248
  • 2
  • 15
  • 28
0
votes
1 answer

How to distinguish displays in gnu-screen multi display mode?

Let's attach to not-detached session few times: In one terminal (say having pts 11): $ screen -x #say this will get pid 111 In another one (say pts 22): $ screen -x #get pid 222 Is there a way to programatically distinguish these two from…
user1558113
  • 146
  • 1
  • 5
0
votes
1 answer

Multiscreening with Ubuntu

I'm running a Half-Life dedicated server on my VPS with following bash file named startserver in HLDS: #!/bin/bash screen -A -m -d -S hlds ./hlds_run -console -game valve -ip **ip address** -port 27015 +maxplayers 16 +map crossfire > /dev/null >&1…
Walker
  • 131
  • 2
  • 16
0
votes
1 answer

How to replace the c-q and c-s bindings for xon/xoff in Screen

While using screen, I use in some application (ne, Nice Editor, to edit text files) the ctrl-q and ctrl-s bindings. But these keys are bound to xon/xoff commands. How could I replace these bindings, with (e.g. ctrl-& or ctrl-" or ctrl-o) modifying…
lauhub
  • 894
  • 1
  • 15
  • 27
0
votes
1 answer

Saving outputs and errors of a program in text files while using Screen in Ubuntu terminal

How can I save the errors and outputs of a program running in the background terminal handled by Screen app in a text file in Ubuntu terminal? I use the following structure but it does not save anything in the text file: Screen -m -d
Fred
  • 45
  • 4
0
votes
1 answer

Changing directory echoes "Directory: "

I have an annoying problem when using Screen on my SLED10 machine. When changing directory (cd, chdir, pushd/popd) the resulting path is echoed in the terminal. user@/home/user> cd .. Directory: /home user@/home> This problem only seem to exist in…
qstebom
  • 719
  • 4
  • 12
0
votes
0 answers

Restart JVM process in Linux Screens

I have a JAR application that launches in a detached screen on machine startup (Ubuntu 14.04). The command is screen -d -m file.sh This works as intended minus one caveat. When he Java process terminates, so does it's screen (as expected.) When…
willbattel
  • 1,040
  • 1
  • 10
  • 37