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.
1,021
questions
0
votes
0
answers
21
views
Linux screen program to override the terminal's logical rows when reattaching to running screen?
I'm using SecureCRT terminal program in Linux, and it has this setting called "Logical rows", and it's currently set to 58. My defscrollback is set to 200000 in ~/.screenrc file.
I can use ...
0
votes
1
answer
29
views
How to cleanup all unused screens?
I would like to remove from my systems all screens I've opened to do my tasks. But I need to get rid of the screens that aren't doing anything. I don't want to kill a screen that something happens ...
0
votes
1
answer
51
views
How to get terminal text from gnu screen session?
How do i get the terminal text from a GNU Screen session in PHP? I am puzzled because GitHub CoPilot suggest i can do
function getTerminalTextFromGnuScreen(string $screenName): string
{
$...
1
vote
1
answer
58
views
simple split gnu screen
I cannot split the terminal into 5 terminals (vertical or horizontal).
I don't understand why the split crashes or does nothing every time I try to do it in the bash or screenrc script.
I don't want ...
0
votes
0
answers
29
views
Trim whitespace when copying from gnu screen in a terminal
I'm running 20.04.4 using the MATE desktop and the mate-terminal (which is a derivative of Xterm, if I understand correctly).
When I copy text from the terminal, trailing whitespace is ignored (as I ...
0
votes
1
answer
31
views
creating a GNU screen during deployment by AWS codeDeploy
I am trying to create a Linux screen during the deployment using AWS codeDeploy.
The purpose is to run the application inside a screen. I want codeDeploy being able to create a screen in detached mode ...
0
votes
0
answers
53
views
Screen script fails when run with github action
I have a bash file(run.sh) that runs my app
#!/bin/bash
screen -S app -dm bash -c "echo starting App from jar && java -jar App.jar"
Now when I run this via command bash run.sh It ...
0
votes
0
answers
47
views
Run script inside Screen with python parallelSSH
what I'm trying do to is:
start Screen session
inside this screen session, execute an alias (which, for completeness, goes into a directory and runs a .sh) inside that screen
and I want to do this ...
1
vote
1
answer
120
views
Screen inside conda environment doesn't use python PATH
I have a conda environment that is running python 3.10.5. It works on the terminal without screen. First I did
conda deactivate
And conda info at this step shows:
active environment : base
...
1
vote
0
answers
71
views
Must be connected to a terminal exception in Java while running the command: screen -s
I have an implementation in Java that opens channel's connection and sends a remote commands to there.
The problem I'm having, is that the following command doesn't work when sending it through Java:
...
-1
votes
2
answers
126
views
The display is wrong when using iTerm2 + screen + emacs on macOS monterey
When I use iTerm2 + screen + emacs, the display is something wrong.
For example, underline is set automatically at whitespace even if I don't customize setting.
And character's color is different from ...
0
votes
0
answers
28
views
VSC Terminal - GNU Screen number of lines in the history
I use VSC and "screens" in the Terminal to watch the processes on the server (Node) (https://www.gnu.org/software/screen/manual/screen.html)
Earlier I was able to see many rows in the ...
0
votes
1
answer
56
views
Startup script to run detachted screen, switch user, and run multiple bash commands
I want to create a small startup script that does multiple things in a row in a screen.
The script starts a named, detached screen (screen -S discordbot -d -m works)
The user inside the script is ...
-1
votes
2
answers
72
views
Using bash with screen in an alias [closed]
I have a screen session that is always running in a separate user (for a minecraft server). Each time I want to attach to this screen, I use su -c 'screen -r mc-1.18.2' minecraft to attach back to ...
0
votes
1
answer
239
views
Cannot execute screen via ssh: Must be connected to a terminal
I have a set of servers and I want to launch a dedicated Python script on each one.
My computer name list is stored into a $COMPUTERS variable, and to deploy my script, I am trying to connect using ...
0
votes
0
answers
27
views
how a command keeps running on the hpc cluster using screen after the ssh connection is broken
I am trying to connect to the hpc cluster from home and run a data analysis pipeline. but as soon as I put my laptop on sleep mode or shut down my laptop (therefore ssh connection to the hpc cluster ...
1
vote
0
answers
23
views
Listing screen sessions cause errors - Raspberry Pi
I am connected to a Raspberry Pi through SSH on my MacBook. Within the SSH, I have used the screen command to create two detached instances of the shell, one instance to monitor sensors, and instance ...
1
vote
0
answers
144
views
Use Popen to have "sessions" for running multiple commands at any time
I'm trying to create a script that can have sort of the same functionality as the "screen" command using subprocess.Popen, where I can run commands in different "sessions" (not ...
0
votes
0
answers
93
views
Launch a Python script through screen in another python script
I have an Python Flask app, which basically tells me the current status of other apps. I'd like for this app to be able to start my other python Flask apps, in screen session. This is because I often ...
0
votes
0
answers
55
views
Resizing screen
I want to make a menu which will show on the right side of the desktop.
the screen size will decrease from the area for this menu (green part) and the remaining part of the screen (Purple area) will ...
0
votes
0
answers
130
views
Crontab job runs script but doesn't run the screen inside of script
I'm trying to run a game server and automate its restarts through the use of bash scripts. The following code is a part of the script:
#!/bin/bash
# start server
screen -d -m -S 'Zomboid PVP 1' /home/...
1
vote
1
answer
63
views
How to keep the window opened even after the command returned or is killed?
I open a detached screen and run some commands in new windows:
screen -dm -S test
screen -S test -X screen -t htop htop
screen -S test -X screen -t top top
screen -S test -X screen -top dmesg dmesg -w
...
0
votes
2
answers
108
views
How to send a Return key in an already existing screen session on MacOS?
First, I create a session by typing screen -S test1, then I detach and type screen -S test1 -p 0 -X stuff "ls^M". This doesn't work, it just prints the characters "ls^M" in my ...
0
votes
1
answer
355
views
How do you pipe and filter text from tail as input for a variable in a script?
Backstory
I am trying to create a script that updates a "device" through the devices cli, but it doesn't accept any form of command following the establishment of an ssh connection.
for this ...
0
votes
1
answer
450
views
How to use hex color codes in zsh/Screen?
On a Raspberry Pi using zsh, I have set PS1=%B%F{#50F862}%n@%m%f%b:%B%F{#625EF6}%~ %#%f%b to mimic the default bash coloring of ${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\...
0
votes
1
answer
109
views
Simulating keyboard input from bash script
I have a simple bash script running few programs in screen like:
#!/bin/bash
program1
program2
program3
<Here I need to simulate Ctrl+A : hardcopy -h logfile in bash script>:
Programm4
But for ...
1
vote
1
answer
137
views
Python re.findall expected string
I want to search for a word in my string with re.findall. The Code is the following:
def check_status():
p1 = subprocess.run(["screen", "-ls"], shell=False)
p2 = re.findall(&...
0
votes
1
answer
198
views
Converting `os.system` to `subprocess` in Python [duplicate]
I want to grep a Linux Screen ID in Python to check if this Screen exists. I would like to convert my os.system command to subprocess command.
From this:
os.system('screen -ls | grep -i ' + ...
0
votes
0
answers
346
views
Screen processes continue to run but can't find the original screen
I'm new to setting processes running via ssh on a server. To allow me to step away and return to them I'm trying to run them in a screen session.
# ssh onto server
ssh myid@server.co.uk
# Start ...
0
votes
1
answer
312
views
Starting a program in screen (linux) using golang
I want to start a .exe file in linux inside a golang project using os/exec library.
I usually use "mono" to start .exe file so i did:
command := make([]string, 7)
command = {"screen&...
0
votes
1
answer
257
views
Starting new Screen on the background on reboot
I have telegram-bot, which I would like to get running every reboot automatically. I've been using Screen to detach this python script manually and leaving it to the background. Before, I have used ...
1
vote
1
answer
241
views
how to see screen node commands logs ubuntu
Im running this command on my ubuntu 20.04
screen -S api -dm node api/index.js
But the screen session ends after 2 seconds, is there a way to see the logs of the screen session? i need to see why it ...
0
votes
1
answer
2k
views
Screen error: Can't locate local/lib.pm in @INC (you may need to install the local::lib module)
I'm new to linux coding and have just been given an account on a server at work. I don't have sudo permissions. For some unknown reason, the 'screen' program has suddenly stopped working. Every time I ...
3
votes
0
answers
474
views
Docker Compose down. Can I run a command before the actual stop?
I have a setup with docker-compose which creates a screen and runs a process in it.
That's because when I use the docker-compose with -d it will run the process in the background and attaching to the ...
1
vote
1
answer
71
views
Difference between screen flags -r and -x
What exactly is the difference between screen -x and screen -r. I know they're both for reattaching to the screen, but not sure I grasp when to use one or the other.
0
votes
1
answer
57
views
how to parse GNU Screen session list?
how are one supposed to programmatically parse GNU Screen session lists? i am using PHP here, but an answer in any programming language would be helpful. i've tried doing it myself with regex and ...
1
vote
0
answers
168
views
Screen -L disable logging
So I actually have two important questions:
I know that screen -L enables auto-logging of screen to a file by default, screenlog.0, screenlog.1, etc. However, if I no longer want to log files, how do ...
3
votes
2
answers
251
views
Running a command that includes an STDIN redirect with screen
Using the Gradle SSH plugin I deploy a .jar file to another machine.
I then would like to run that jar in a detached screen session.
This wouldn't be a problem if the application did not require input ...
1
vote
0
answers
44
views
GNU Screen doesnt show colors or ascii full block
I`ve codet a simple cli app. This app uses ansi codes like \x1B[48;2;190;190;0m for color. In addition it uses ascii full block (█) to display qr-codes.
When I run my application in the normal linux ...
0
votes
0
answers
102
views
Is there any way to reattach to a screen session that's in a loop?
Technically, I'm using Cygwin to run screen on Windows if it matters.
Say I have a simple loop running. Like "Enter a number, if it's not zero, loop back and enter another number." and I ...
0
votes
1
answer
225
views
screen says "copy mode aborted" when I ctr-c number
Trying to move between screens in screen. I press Ctrl-C then the screen number I want. It doesn't work and the top of the screen says "copy mode aborted". What's happening?
0
votes
0
answers
136
views
How do I turn screen logging off?? I did `screen -L` once and now a file called screenlog.0 keeps getting generated
I entered screen -L in iTerm2, and now whenever I open a new terminal window, a new file screenlog.0 gets created and shows up in git, which I don't want (and I don't want to delete it every single ...
0
votes
3
answers
326
views
Sending commands to screen: limits of "stuff", quirks w/ newlines
Trying to pass a long command string to Screen via the "stuff" option. Have done this successfully in many scripts when the string is short and it exists in the in bash, like so:
screen -d -...
1
vote
0
answers
39
views
Behavior of screen over ssh + cygwin / screen detachment
When I use screen, it works fine except up to the point where I need to re-attach. My suspicion is that the sort of "shelled" environment I am using is not letting screen fully detach ...
0
votes
0
answers
858
views
How to keep a docker container running some background processes
I have a python script that launches multiple programs in different screen sessions (gnu screen: terminal multiplexer) and exits.
The screen sessions keep running in the background.
Everything works ...
-2
votes
1
answer
71
views
Running Vim in GNU Screen: How to avoid Shift+left/right to delete characters
I found that Shift+left and Shift+right delete characters,
when running Vim inside a GNU Screen session.
The same is true for Ctrl+Shift+left and Ctrl+Shift+right.
Usually, these combination are ...
0
votes
2
answers
2k
views
Run without debugging in VSCode automatically changes terminal
I am trying to run my current python file through Visual Studio Code.
I have a default 'bash' terminal and from there, I create a 'screen'.
I click on the 'Run without debugging' option in VSCode and ...
0
votes
0
answers
229
views
node systemctl for discord.js bot error EACCES
I want to start my discord.js bot with a systemctl.
When I enter
[Unit]
Description=Bots by Tjum28
After=network-online.target
[Service]
User=pi
Type=simple
ExecStart=/usr/bin/node /home/pi/Bots/bot....
0
votes
1
answer
93
views
Bash Cronjob not executing second command to start new gnu-screen
I have a bash script I'm using to quit a current screen program then restart it.
#/bin/bash
/usr/bin/screen -XS bot quit;
/usr/bin/screen -d -m -S bot luajit /root/bot/Lumble/client.lua
I have it ...
0
votes
1
answer
504
views
Automating setterm
I've GNU/linux Debian 10 (sid) net install with no x11 on a HP Pavilion dv6. I can keep the monitor on alway with:
setterm -blank 0
Then have the monitor shut off after 10 minutes of inactivity with ...