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

compound command with bash -c in tmux vs screen

I need to run a command with bash -c within a tmux session, from within a shell script. In contrast to screen, tmux seems to require to quote the entire command, which leads to problems as bash -c also requires quoting for correct functioning with…
jvf
  • 866
  • 7
  • 13
0
votes
0 answers

bash script run job after screen command in one script

this is what i want to do : #!/bin/bash # start the tunnel ssh tunnel@hostA -L 6000:hostB:22 -N # this is the problem, i need to go next process after tunnel on # Main proses that i must run under tunnel command sftp -oPort=6000…
0
votes
1 answer

Screen CS:GO server cvar change

i want to send commands into a screen with .sh script. Start a CSGO server with: screen -S cs ./srcds_run -game csgo -usercon How can i send a command to the csgo server like: sv_cheats 1
0
votes
3 answers

Switching between two Mac terminal windows

I have an interactive bash script running in a Mac OSX bash Terminal window. I would like, from within that script, to open a second Terminal window, print in it the content of a variable from the script in the first window, keep that second window…
user3781201
  • 1,261
  • 2
  • 9
  • 7
0
votes
1 answer

how to launch screen and then execute a command inside this screen?

When I type in: screen -S game;ls; However the 'ls' command is executed outside the screen. How can I start the 'game' screen and execute the ls command inside the screen ?
yarek
  • 11,278
  • 30
  • 120
  • 219
0
votes
1 answer

Can't stuff literal $$ into gnu screen window

I am attempting to stuff a line s.a. echo $$ | command into an existing screen window. e.g. screen -S session -X stuff "echo $$ | command\n" However $$ appears to already have been evaluated once it is entered into the window. e.g. echo 7589 |…
user625529
0
votes
1 answer

how to send ctrl + c to another screen?

I am trying to send ctrl + c to another screen. How can I do this? screen -S railsServer -p 0 -X stuff $'\cc' screen -S railsServer -p 0 -X stuff $'^C' However these don't seem to work.
bezzoon
  • 1,755
  • 4
  • 24
  • 52
0
votes
1 answer

Using screen session with Theano - race conditions

When training a neural net implemented in Keras in a screen session, I appear to be running into race conditions with Theano. I proceed as follows. I ssh into the compute cluster I am using (which I am not a root user of). Then I run: screen -S…
user19346
  • 303
  • 3
  • 9
0
votes
0 answers

Start detached screen with ssh , without killing after the commands execute

Need a suggestion. I execute remote ssh commands by passing arguments to ssh. Now I do that by firing everything inside a detached screen session. The problem is the screen session terminates as soon as the commands execute off. Example: screen -dmS…
neuron
  • 128
  • 4
0
votes
1 answer

How to run multiple screens each with a command programmatically?

I'm new to linux screen utility, and now I have to create a lot of screens, passing each some command. How to achieve that programmatically instead of creating each screen with (Ctrl+a c) and typing the command there?
user1011792
0
votes
1 answer

Script or Key binding to run commands easily on Linux

I am using Screen with scrollback 100000. When I run the command clear or any other similar commands like Cmd-K (SSH to linux machine on MAC), it just clears the current displayed screen, not the scrollback history. I googled and found out that if I…
whiteSkar
  • 1,614
  • 2
  • 17
  • 30
0
votes
0 answers

Screen big data without interrupting data conversion

This thread is an extension of this thread where the interruption (CTRL-c) stop the data transfer into less. I would like to create a similar system monitoring data conversion as is found in fdupes. I think this can be reached with GNU screen.…
0
votes
1 answer

Get directory of running screen session

In general, I have long simulations running on several screen sessions which can get confusing. Is there a way to get the directory on which one specific screen session is on? EDIT: I just realized that the easiest thing to do is just to launch the…
solalito
  • 1,189
  • 4
  • 19
  • 34
0
votes
1 answer

How to use bash tee to redirect stdout and stderr to a file from script which has screen in the hash bang

I have a script which needs to run in screen so I included #!/usr/bin/screen /bin/bash as the hash bang and it works great. The only problem is that when the script crashes I don't know what happened, the output is lost and all I know is that…
Bart C
  • 1,509
  • 2
  • 16
  • 17
0
votes
0 answers

Execute a command on a shared gnu-screen (php to garrysmod)?

I'm trying to get a website compatible with a screen. I have a Garrysmod game server running on the user garrysmod. So when I am on the website, I'm on the user www-data, and I need to access the screen "gmod" on user garrysmod. I have multiuser on,…