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
2 answers

How to start multiple screen sessions from bash script

I want after a restart, run two screens with programs in each. Here is my script: #!/bin/sh echo Killing all existing screens... screen -X -S launcher quit sleep 2 screen -X -S server quit echo Loading launcher screen... screen -S launcher -d -m…
arti
  • 645
  • 1
  • 8
  • 27
0
votes
1 answer

Check if nodejs is running in screen

I have a few nodejs processes running in different screens on a ubunutu-server. If a process in one of these screens crashed I’d like to have a script which automatically restarts the node script in the background. I always get solutions only…
0
votes
1 answer

GNU Screen tab titles all just 'zsh'

OK, so I want to start by first explaining my setup. I have a windows desktop at home, and I am SSH'ing into an Amazon EC2 instance (via PuTTY) running Amazon Linux. I have zsh as my default shell, and oh-my-zsh installed as well. This "cloud…
Straker
  • 1
  • 1
0
votes
1 answer

Hudson-ci refuses to launch screen on OSX

I have a very intermittent issue (and now constant failure) launching gnu-screen on OSX from hudson. I have a shell script that does just this: #!/bin/bash screen -dm -S foobar From the command-line as the hudson user this works just fine, and this…
cybertoast
  • 1,343
  • 13
  • 19
0
votes
1 answer

Is there a way to get which session is associated with which logfile in screen?

I'm using screen to monitor several parallel jobs to test small variations of my program. I gave each screen session a different logfile. I do not remember which logfile I set for which session, and now wish I did! Is there a way to query which…
jvriesem
  • 1,859
  • 3
  • 18
  • 40
0
votes
0 answers

get screen id via ssh in php

I am trying to run a lengthy command from a remote server on php using screen, but i want to make sure that the screen is killed at the end of the command. So i am trying to use "echo $STY" to get the screen id and kill it that way. for some reason,…
Bobert1234
  • 130
  • 12
0
votes
1 answer

Using Python3 or Bash, how can I send ctrl+a d to my program?

I know this question has been asked a few times, and the answer that I have seen is screen -m -d. What seems to separate my situation is that I'm trying to have tcpdump running in that screen, and when I combine tcpdump with -m -d, tcpdump never…
0
votes
1 answer

How to not receive the GNU notification every first time I run screen

I have been an avid user of the "screen" command for a long time now and suddenly I seem to have a problem getting it to work. Every first time I start screen in a new terminal session I get this message: Screen version 4.00.03 (FAU)…
Ivonet
  • 2,492
  • 2
  • 15
  • 28
0
votes
1 answer

Is there a way to initiate UNIX screen with keyboard commands?

Is there a way to begin a screen session with keyboard commands? For instance I want to start screen, split the window horizontally, and then switch to the bottom window with one command. Currently I can only start screen and then running the…
0
votes
2 answers

Creating new 'screen' within existing screen

I have a game server. It runs on linux via dotnet. I run this inside a 'screen' session. However I am struggling with restarting this server. From outside, it is easy. I just kill existing screen via name and create new one. However when I want to…
Jacob
  • 627
  • 6
  • 15
0
votes
0 answers

Kill screen session using java

I'm trying to kill a detatched screen session. Recently I have started a screen session with the following java code: Just created a new ProcessBuilder: ProcessBuilder pb = new ProcessBuilder("/bin/sh", "-c", "screen -mdS " + servername + " java…
0
votes
1 answer

GNU-screen: preservation of screen state with commands

I am encountering an issue while usage of screen. I am using PuTTY Let's say, I am attached to a screen and execute the command ls -la Assuming the output covers my entire screen, I then issue vim a.txt After quitting VIM, I don't see the result…
Zoso
  • 3,273
  • 1
  • 16
  • 27
0
votes
2 answers

Where is the source for /usr/bin/lock?

I have a Mac with snow leopard. I often work off the terminal using tmux (or GNU screen) When I walk away I remote ssh back to my computer. The thing is sometimes I have to step away from the computer for a minute or two. When that happens I don't…
Sukima
  • 9,965
  • 3
  • 46
  • 60
0
votes
1 answer

How do I send the same command to a subset of all windows in a screen session

In the answer to this post Corey Henderson explains how you can use the at and stuff commands in screen to send commands to all windows of a screen session at once. I would like to know how I can stuff the input buffers to some windows at the same…
Chancelot
  • 63
  • 1
  • 5
0
votes
1 answer

sudo screen -dmS

I'm attempting to start a new screen from a PHP script using shell_exec(), the command I'm running is using sudo, i.e sudo screen -dmS [name] .... while I am able to kill screens using sudo screen -S [name] -X quit perfectly fine, I am unable to…