Questions tagged [gnu-screen]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
388 views

Custom systemd unit fails to start gnu screen and fork to background

I am trying to make systemd unit that starts a script inside GNU screen headlessly. I did base my work here on a couple of questions some had that were related. I also tested the ExecStart line in a ...
Kaizushi's user avatar
0 votes
1 answer
24 views

Screen inside Mac OS seems to go idle

We have Mac Mini with a classic Mac OS install (12) that runs a command every x minutes within a screen instance using a pipenv command that look like this. [scripts] some_pipenv_command="sh -c '...
AsTeR's user avatar
  • 257
0 votes
1 answer
191 views

Quitting screen without a prompt

I would like to exit my active screen session and kill (not detach) the session. This is done with CTRL + a and then k, however screen then then prompts you "Really kill this window [y/n]" ...
Rino Bino's user avatar
  • 603
0 votes
3 answers
2k views

How to run Python venv script with screen in crontab

I have a sh script with the following content: screen -mdS myscript /home/myscript/myscript_env/bin/python3 /home/myscript/bot.py This script executes a python script and opens it in a new screen. It ...
Steven2105's user avatar
2 votes
1 answer
1k views

Is the root user able to administer screen for other users?

We're trying to rewrite a draconian screen session killer for users who leave their screen sessions up for an inordinate amount of time and have in some way or other circumvented our session timeouts. ...
Peter Turner's user avatar
  • 2,298
0 votes
0 answers
642 views

Starting screen session as a service, how do I transmit the screen session output (back) to the service log?

I have an application that is a interactive shell. I want this application to run as a service. To be able to access the shell while the service is running, I figured its best to start the service as ...
birgersp's user avatar
  • 107
2 votes
0 answers
170 views

Stop gnu screen from asking for a password on screen -rd

Looks like GNU screen considers detach a lock request, and always locks when detached. How do I disable this? I trust all users (myself) on the box, and care little about the security implications.
lwa's user avatar
  • 21
0 votes
2 answers
598 views

Howto start and detach screen with user environment on startup?

I want to start screen and put a couple of programs running inside on startup. I've seen many similar posts but none answered my question. so I put in rc.local following 2 lines: screen -dmS scr ...
DenisZ's user avatar
  • 38
0 votes
1 answer
670 views

Cannot stop screen started with systemctl start [closed]

On ubuntu server 20.04 I created a service definition for a Minecraft server within a screen session like that [Unit] Description=Minecraft Server After=network.target [Service] User=minecraft Nice=...
Jan's user avatar
  • 111
0 votes
1 answer
170 views

Upgrading GNU screen in-place without restarting

I am looking into upgrading GNU screen following CVE-2021-26937. My question is simple: can I upgrade GNU screen without restarting my current screen, e.g., by a kind of in-place upgrade mechanism ...
a3nm's user avatar
  • 919
1 vote
1 answer
1k views

How to monitor stdout logs in an EC2 screen session?

I'm running a CLI on an EC2 server (Amazon Linux image), which I let run indefinitely with the screen terminal multiplexer. My program queries an API continuously and logs the current state to stdout: ...
Paul Razvan Berg's user avatar
1 vote
0 answers
1k views

Keeping processes alive when closing SSH connection on MobaXTerm

I'm facing somme issue when trying to keep process alive when shutting down session in MobaXTerm. I have a java process which should run on a linux server. I am using two commands, nohup and screen. ...
Sebr's user avatar
  • 11
0 votes
0 answers
126 views

Do not log colors to screen logfile?

Running an application inside screen to log all output including stacktraces not caught by the applications logging. Screen is however logging all formatting like ^[[58;1H^[[58;1H which results in ...
user2280032's user avatar
1 vote
2 answers
2k views

screen inside systemd daemon on CentOS 8

So I want to run screen inside a systemd service so that I can give the process (inside the daemon) commands while it is running. See at the end of the question for examples of what I want be be able ...
Rinkana's user avatar
  • 11
1 vote
1 answer
657 views

script to attach screen and run command but do NOT detach

I want to do something like this: #!/bin/bash screen -r session -X run 'long-cleanup-and-quit' doing-something-else ... Which is fine, but I want 'doing-something-else' to wait for screen. screen -X ...
hyy's user avatar
  • 11
1 vote
1 answer
3k views

Save or capture Screen output to file after it has written to stdout?

I've run a script in a screen session but I forgot to redirect stdout to a file. There's about 10MB worth of text. If there's even some way to highlight the text and copy paste I would, but Ctrl-A + ...
RTF's user avatar
  • 218
0 votes
1 answer
647 views

LINUX: is it posible to show on tty1 the same thing I see when logged in via ssh?

I am logged in via ssh int a foreign Linux box, and the owner want to assist me from tty1. I tried to convince him to log also in and share a screen with me. He insists he want to assist me from tty1....
Max Muster's user avatar
0 votes
1 answer
30 views

Amazon EC2 only running one http script

I'm running a python script to scrapping a page in my EC2 server using screen linux though a SSH connection. My EC2 account is the free tier offered by them. Every time I try to run another script (...
Rafael's user avatar
  • 1
0 votes
0 answers
731 views

Attach root-user screen session as non-root user

I have a screen session that is started by root and I would like the non-root account (guest) be able to attach the root user's screen session in multi-user mode with screen -x. Is this possible? ...
GNULinuxOnboard's user avatar
0 votes
0 answers
42 views

GNU screen: Endless flickering on attach

I run a process in a background (i.e. nobody attached) GNU screen session on a fresh Kubuntu machine (in a qemu vm). It starts very early during boot, runs for many minutes, and creates all kinds of ...
ginger's user avatar
  • 3
0 votes
1 answer
147 views

Monit background script running within a detached screen

How can Monit be used to monitor a simple script that creates no PID file and is running in the background within a detached screen session?
titel's user avatar
  • 111
0 votes
2 answers
382 views

re-parenting to screen two processes joined by pipe [duplicate]

Let's say in a PuTTY connection I start mysqldump --host host1 --databases db1 db2 db3 | mysql which creates two processes: mysqldump with PID 5800 and mysql with PID 5801. Is it possible to let the ...
user avatar
0 votes
0 answers
192 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 ...
Alexandre Strube's user avatar
1 vote
0 answers
291 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 ...
sfxworks's user avatar
  • 157
0 votes
1 answer
1k views

Starting java program and screen with cron at boot [duplicate]

I am trying to run a java program inside a screen session at boot, I am using the following cron, but after reboot screen -ls shows no active screen sessions. @reboot /usr/bin/screen -dmS myservice "...
Arya's user avatar
  • 131
1 vote
1 answer
122 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-...
Larold's user avatar
  • 812
1 vote
3 answers
815 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....
toom's user avatar
  • 227
1 vote
0 answers
77 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....
aarelovich's user avatar
1 vote
1 answer
133 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 ...
keith's user avatar
  • 11
1 vote
0 answers
78 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 ~/....
János Geringer's user avatar
0 votes
1 answer
1k 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/...
jerry's user avatar
  • 111
5 votes
3 answers
1k 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 ...
Maciej Swic's user avatar
1 vote
0 answers
396 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: [email protected] [~/bit]# ls -la /var/run/screen/ drwxrwxrwx 4 root screen ...
user2047861's user avatar
1 vote
0 answers
46 views

how to avoid screen termination once the job is done [duplicate]

using a shell script i am ceating multiple screen in which i m running rsync cmnd with below syntax, n i m able to do so. screen -dmS "$SESSION_NAME" "$COMMAND" "$ARGUMENTS" but as soon as rsync ...
sandeep.dawre's user avatar
4 votes
3 answers
4k views

How to launch crontab commands inside of certain screen sessions?

I have a crontab that runs like this: 0 0 * * * /execute/shell/script.sh 0 0 * * * /execute/shell/script1.sh 0 0 * * * /execute/shell/script2.sh And, I want to launch each script in a different ...
makansij's user avatar
  • 265
36 votes
1 answer
4k views

Recover a running script from a terminal session

So I'm using GNU Screen to manage multiple running scripts/programs. The multiplexing & detachability is quite helpful. I removed a script from disk and now I'm having some trouble finding the ...
Fdo's user avatar
  • 463
2 votes
1 answer
5k views

/var/run/screen permissions changing to 775 without restart

Good <Insert Part of Day>, I am currently having an issue with several of my boxes running CentOS 7.3.1611 wherein the permissions for /var/run/screen are being changed to 775, resulting in the ...
sssssss340's user avatar
1 vote
1 answer
3k views

How to detach Screen session with a command with Python Fabric

I know about Ctrl A and D combination. What actually I am looking that I am running a long process with screen. I want to programatically come out of it as I am using Fabric to automate my activities. ...
Volatil3's user avatar
  • 275
0 votes
3 answers
800 views

why must I use sometimes screen -rx and not screen -r?

Sometimes to get access to screen console I need to user screen -rx and not just screen -r. Any idea why and why this happens ?
yarek's user avatar
  • 847
6 votes
1 answer
2k views

Obtain hardcopy from a screen session

I have a job launched in a screen session which is expected to run for several hours. From time to time I'm requested to check if job is still running and guess at wich % of work is. Guess if it is ...
alphamikevictor's user avatar
0 votes
1 answer
957 views

Killing screen session and starting a new one, cron

I have a screen session I run with a couple windows going on it that are running a couple applications that run a console in the terminal window (thus why I run them in screen). I would like to be ...
ComputerLocus's user avatar
2 votes
2 answers
5k views

keeping a detached ssh process running *after closing the ssh client*

I ssh in to my ubuntu machine usimg mobaxterm. This works very well. Sometimes I want to keep a process running but exit my ssh session (and exit mobaxterm). I have tried the following but ...
lazarus's user avatar
  • 121
2 votes
1 answer
1k views

open screen in background and start a process

I want to do the following: After reboot I want to start a screen which then should execute a script. Therefore I searched for crontab and screen and I also did find some answers. However, nothing ...
Tom Tom's user avatar
  • 27
0 votes
1 answer
64 views

How can I get su screen PID on Debian8?

I want to run this command by another user (so with su): screen -ALmdS server_mta ./mta-server -n It's okay: su - server_2 -c 'screen -ALmdS server_mta ./mta-server -n But I need the PID of screen, ...
Maróthy Zsolt's user avatar
1 vote
1 answer
408 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 ...
ddofborg's user avatar
  • 223
1 vote
1 answer
542 views

Init script doesn’t work properly by using “service” command

I have the following startup script, which should either start or stop a screen in detached mode: #!/bin/sh # node2 # Maintainer: @KittBlog # Authors: [email protected] ### BEGIN INIT INFO # ...
KittMedia's user avatar
  • 248
0 votes
1 answer
1k 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 ...
Ken Sills's user avatar
1 vote
1 answer
207 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 ...
bhygate's user avatar
  • 111
3 votes
1 answer
2k views

Owner of screen session

When I logged in a server and issue a 'screen -list' commands it gives the following result - 31917.pts-5.office (Detached) 31844.pts-0.office (Detached) But it is sometimes important to ...
Razib's user avatar
  • 175
0 votes
0 answers
725 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 ...
WildDev's user avatar
  • 167

1
2 3 4 5
7