gnu-screen

GNU screen copy paste breaks lines

GNU screen copy paste breaks lines I’m running a Armbian on a PI and operate it through a Serial USB TTL dongle. I’m running the following command to connect to the PI: screen /dev/tty.usbXXXX 115200 I can successully log in and run commands but when I try to paste a long file, things go terribly …

Total answers: 1

How to make screen command use shell "bash" instead of shell "sh"?

How to make screen command use shell "bash" instead of shell "sh"? Realized that my bash script in development needs thourough testing from line 1, line by line Started mate-terminal session Split screen vertically, left side emacs editing bash script, right side watch command of said bash script, so that edits on the one side …

Total answers: 2

What's the difference between "-dm" and "-Dm" in GNU Screen?

What's the difference between "-dm" and "-Dm" in GNU Screen? The GNU Screen manual says: `-d -m’ Start `screen’ in _detached mode. This creates a new session but doesn’t attach to it. This is useful for system startup scripts. `-D -m’ This also starts `screen’ in _detached_ mode, but doesn’t fork a new process. The …

Total answers: 1

Running GNU screen through SSH, the shell is not a login shell?

Running GNU screen through SSH, the shell is not a login shell? I’m using screen (the problematically named terminal session manager) on a remote system accessed over SSH – to run long running processes and such. I have eventually started using a command to attach directly to the screen session, instead of first logging in …

Total answers: 1

zsh gnu-screen tab completion for `-x` flag similar to `-ls`

zsh gnu-screen tab completion for `-x` flag similar to `-ls` In bash, when I type screen -x and press tab twice, I get a list of all the running sessions. In zsh, when I type screen -ls and press tab twice, I get a list of all the running sessions and can tab through them, …

Total answers: 1

screen -t <titlename> , does not set screen title properly

screen -t <titlename> , does not set screen title properly I setup $HOME/root/.screenrc with caption always "%3n %t%? @%u%?%? [%h]%?%=%c" This is supposed to show the title at the bottom When I launch a new screen with screen -t testtitle I see a different title 0 root@SERVERNAME:~ I can then set the title with ctrl–a …

Total answers: 1

execute a command by screen in another user

execute a command by screen in another user I’m trying to run a command on screen from another user, but I’m having trouble. this is the command line: sudo -u user123 screen -A -m -d -L screenlog.0 -S test123 ./my_program. This is how I’m doing it: sudo -u user123 bash -c screen -S test123 -p …

Total answers: 1

Mistakenly started a long running task on an ssh shell

Mistakenly started a long running task on an ssh shell I understand that a long-running job on a server should be started with nohup/screen/tmux. But sometimes by mistake, I will start a job w/o realizing how long it would take. For example, I recently issued a move command (in an ssh shell) from a physically …

Total answers: 1

How to start a screen with crontab

How to start a screen with crontab sudo Crontab -e 15 0 * * 1-5 /usr/bin/screen -S wake_up -d -m /home/pi/auto/wake_up.py But at 00:15 there is no screen started… This command: (worked in terminal) screen -S wake_up -d -m /home/pi/auto/wake_up.py Python File: #!/usr/bin/env python3 import time x = 1 while x<10: print (x) x += …

Total answers: 2

GNU screen: How to rename current window via shell commands?

GNU screen: How to rename current window via shell commands? I have an interactive shell (assume dash) running under a GNU screen session. Is it possible to rename the "current" window via commands issued to the interactive shell? If so, then how? By contrast, if I wanted to accomplish the same thing via GNU screen …

Total answers: 1

Why I can open serial via screen but cannot open via minicom?

Why I can open serial via screen but cannot open via minicom? I have an arduino communication via Serial port at /dev/ttyACM0 and I can open it via screen: $ screen /dev/ttyACM0 115200 But for some reason I have no privileges to open it via minicom: $ minicom /dev/ttyACM0 -b 115200 minicom: cannot open /dev/tty8: …

Total answers: 2

How to know if I am in a screen of a screen?

How to know if I am in a screen of a screen? I know how to see if I am in a screen: I have made an alias alias inscreen = ‘echo $STY’ . But earlier today, I accidently type screen inside a screen without noticing it and in some way it made me make …

Total answers: 1

Execute bash function to run screen

Execute bash function to run screen I’m using an aws ubuntu instance. I would like to create an alias/function to run some shortcuts, for example to activate a python virtual environnement in a screen. I’ve made this function for example: # Alias for jupyter notebook function start_jupyter() { cd my_path/lab_workspace/ # 1. cd into my …

Total answers: 1

Set multiple environment variables for existing screen session

Set multiple environment variables for existing screen session I have an existing screen session and now I need to set some (more than one) environment variables to that session. These environment variables should not be visible to other screen sessions. I tried the solution in this answer which didn’t work. I tried screen -r "myscreen" …

Total answers: 1

How to control systemd service using screen?

How to control systemd service using screen? I’ve set up a systemd service to run my Minecraft server. Now, I need it to repeat the start script when the server crashes. Here’s my code so far: #!/bin/bash while true; do cd /home/mcserver/Spigot echo Starting Spigot… echo 600 > ./restart-info java -jar spigot.jar echo Server has …

Total answers: 3

How to scale the resolution/display of the desktop and/or applications?

How to scale the resolution/display of the desktop and/or applications? While using Xorg X11, on KDE/Gnome/XFCE how can we scale the display/resolution for the whole desktop and/or per application? (when this is not available on the settings GUI) The purpose is to keep the screen resolution unchanged (at max) while scaling the size (bigger/smaller) of …

Total answers: 3

Problem setting up systemd service to run screen at reboot

Problem setting up systemd service to run screen at reboot I have a remote server running CentOS 7 I can only access by SSH. I want two java servers running on them at all times, even after ISP does reboots etc. S So I have tried to make a systemd service that starts the two …

Total answers: 3

Setting up a screen session on system startup

Setting up a screen session on system startup I have a raspberry pi on which I’m running some services. I need to be able to ssh into the machine and monitor those services. Currently, what I do is I log in, run screen, then create three windows and in each window run the script that …

Total answers: 2