Questions tagged [gnu-screen]

GNU Screen is a software application that can be used to multiplex several virtual consoles.

2
votes
2answers
62 views

Screen session only limited to 8?

I have a shell script as following #!/bin/sh screen -d -m -S script1 /usr/bin/ruby script1.rb; true screen -d -m -S script2 /usr/bin/ruby script2.rb; true screen -d -m -S script3 /usr/bin/ruby ...
1
vote
2answers
117 views

how to create a screen session within an existing screen session

Case scenario: When I open my terminal, screen starts automatically. This is useful because I often need multiple screens locally within the same terminal. However, if I connect via SSH to a server ...
0
votes
2answers
82 views

If run as a cronjob my shell script doesn't launch a screen

Please have a look at the following simple shell script startCleanup.sh: #!/bin/sh screen -d -m -S cleaner /usr/bin/python3 /opt/cleanup.py My crontab looks like this: * * * * * /opt/startCleanup....
0
votes
2answers
610 views

Screen command in shell scripting

I am a newbie in shell scripting and want to use the screen command to automate the below scenario: Create a screen session1 and execute a shell script1 create another screen session2 and execute ...
0
votes
2answers
145 views

Is there a way to watch all screens output in a single place?

having about 12 screens running long processes, I am willing to check out the state from time to time. I would like to "tail -f " them all in a single console window so I don't have to switch between ...
0
votes
2answers
153 views

Creating a backup script involving screens and java?

Hi guys I use centOS 64bit 5.7 and I need to create a backup script What I want it to do: screen -r example command into java pause for x amount of seconds exit screen zip/rar a folder which and put ...
2
votes
1answer
308 views

Start a screen through svcadm with Solaris 11

I am running into a problem when trying to start a detached screen through a Solaris 11 service. This service controls nginx. When I reboot the system, the screen doesn't start, but if I issue ...
1
vote
1answer
103 views

On Google Cloud, GNU screen just exits with no message - Ubuntu and Debian

On Google Cloud Compute Engine GNU screen is exiting with no message. It works if I "sudo screen" but that is not what I need. The binary is suid root and has correct permissions, and I have also ...
1
vote
1answer
124 views

Bash script: get real remote (mosh+ssh) IP

I'm using Mosh + GNU Screen for most of my remote work. I'm also moving to location during the week (with different IP addresses) and this setup keeps everything running like a charm. There is one ...
1
vote
1answer
137 views

Run command in screen when LSB initscript stopped

I'm trying to get a Bukkit server to run inside a screen as a service, started from an LSB script but I cant get it to stop correctly. What I essentially want it to do is reattach the screen and send ...
1
vote
1answer
568 views

SCREEN: Permissions and security

I was just looking for some clarification on the screen command and permissions: I ran this command to allow the user to view their detached screen. Otherwise the user could not view their detached ...
1
vote
1answer
810 views

embedded linux serial terminal

I have built a custom embedded system using debian 6.0. using /etc/inittab i have made several (8) processes running on different /dev/ttyX terminals, which i can switch between using Alt+FX key ...
1
vote
1answer
741 views

Destroy a dead window in Screen

I know I can kill the current window using C-k, however it doesn't work for a dead window. Is there anyway to kill it? Thank you. C-a C-k (kill) Destroy current window.
0
votes
1answer
20 views

Can GNU screen leave you at shell prompt after command instead of exiting the TTY?

I commonly need to run a specific screen session with 9-10 windows, most of which need to run either an interactive command, or simply a setup-type of command. I do this via screen -c <config-that-...
0
votes
1answer
309 views

Unable to run X server on a remote VPS server using xvfb

My app uses the library https://github.com/wkhtmltopdf/wkhtmltopdf which requires X server. Here's a workaround: echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/...
0
votes
1answer
349 views

Need to send ^C to CLI using GNU screen over serial interface (/dev/rfcomm0)

I am connected to an embedded Linux device using GNU screen. The connection is via /dev/rfcomm0 which is a Bluetooth serial interface. I frequently forget to put an & after a CLI command, which ...
0
votes
1answer
1k views

Execute a service as a specific user under ubuntu

I'm running a gameserver and want to start it on a screen on system start, but screen is user specific, so I have to run the command as 'user'. So I wrote this short service script which starts itself ...
0
votes
1answer
397 views

GNU screen 4.2.1 in xterm: hardstatus in window title disappears

The only 2 lines in my ~/.screenrc are: termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' hardstatus string "%h [screen %n%?: %t%?]" In GNU screen version 4.0.3 that I used previously, it ...
0
votes
1answer
252 views

Can I make gnu screen display a message to a user when they attach to a screen session

I was wondering if there is a way to make screen display a message to a user when they attach to a screen session? For instance, if it is preferred that a user does not use a shared screen session for ...
0
votes
1answer
1k views

screen, expect and scripted detached interaction

Trying to write a bash script which will open a screen, start a python application, and interact with the python interaction as required when it is first started. If not possible in screen, I would ...
0
votes
1answer
78 views

Discerning which GNU screen window is being used in a shell script

Using a shell script, how can you tell if a screen is running using shell scripts? For example, using pseudocode: IF (screen.screenname.running == TRUE) or something like that.
-2
votes
1answer
895 views

Starting/Stopping Custom PHP Chat Server Linux Service (CentOS)

I have been trying all night to get this service working properly. I created this script from a template and am very new to bash coding. I wrote a fully functioning chat server in php which runs ...
1
vote
0answers
70 views

Create a screen. Run said screen as a user. Detach

I'm essentially trying to combo Create screen and run command without attaching and another answer that allowed me to run a script as another user. I want to SSH from Server 1 -> Server 2 and run a ...
1
vote
0answers
62 views

How to use screen with mysql cli?

Here is what is happening. I'm using debian with KDE. I open Konsole. I use ssh to log into my amazon server. All of the following commands are done in the Konsole whiled logged into the amazon server....
1
vote
0answers
38 views

How to tell screen use use different bash_profile?

How can I tell to screen to use different bash_profile? Problem is we use a technical user to log in, but I edited a custom PS1. Normally I login with putty like: ssh user@host -t "bash --rcfile ~/....
1
vote
0answers
86 views

Create screen session in background only if it doesn't already exist

How can i create a screen in detached mode only if it doesn't exist? This creates a screen named name in detached mode but will create duplicates screen -dmS name command This creates a screen only ...
1
vote
0answers
110 views

screen Cannot access pts/0 No such file or directory

I want my script continue to run after ssh session terminate. I have no root access to server. What I tried: autos@autos.tech [~/bit]# ls -la /var/run/screen/ drwxrwxrwx 4 root screen ...
1
vote
0answers
689 views

Ubuntu Allow users access to roots “screen” command, also restrict which screens they can attach to

I'm trying to allow a user to connect to the screens that the root user has. When another user does "screen -ls", it shows "No Sockets found in /var/run/screen/S-USERNAMEHERE". In addition to this, ...
1
vote
0answers
69 views

Every process I start, apart from nginx, dies after a few hours on AWS EC2 Ubuntu instance

I'm new to ubuntu (coming from mac) and I'm trying to run a couple of java servers and a node server on an ubuntu Amazon EC2 instance. I run each server in its own screen session, and everything ...
1
vote
0answers
1k views

How to kill all process on ssh logout? (Kill running Background proccess started with screen etc)

Hi i have a multiuser centos server running. There are for example 3 users (non root) - each of them have their own homedir. SSH Login is allowed (bash). How could it be reached, if a user started ...
0
votes
0answers
14 views

resume tar command when nohup/screen is not possible

I have a dataset which is quite big - a few petabytes. Untarring it into a new filesystem takes a couple days. The problem is that the server does not allow me to have a process running over 24h - it ...
0
votes
0answers
46 views

Some .screenrc commands not working in my .screenrc

When I ssh into my server a screen session is automatically started. This is my screen rc: termcapinfo xterm* ti@:te@ bind ' ' windowlist -b caption always "%{= kc}%H (system load: %l)%-21=%{= .m}%D %...
0
votes
0answers
16 views

Using screen/tmux to ssh into remote computers and issue a sudo elevated script for patching

Before I get a lot of suggestions, I know of patching tools like Satellite and/or config management tools and others. But I'm hoping this community will entertain me here and assist with pointing me ...
0
votes
0answers
542 views

CentOS 7 screen session has been terminated unexpectedly

I've default CentOS7 server without any additional software except of WildFly10 and I'm the only user there. I'd run WildFly using screen command and logged out from the server until it became ...