Questions tagged [gnu-screen]

screen (GNU Screen) is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). For computer monitors, see the tag /monitors.

0
votes
0answers
9 views

Screen goes off (black) until I suspend and resume the system, how can I run a command to reboot screen without suspend?

I have Linux mint 18.3 Sylvia My screen goes off (black) until I suspend and resume the system, While everything is working fine (keyboard mouse audio..etc) just the screen is black. so I thought ...
2
votes
0answers
607 views

Linux Mint - Glitch in Screen Recording video files

I am new to Linux, and most things seem to work fine; but it is not the case of Screen Recording. I have tried with the following programs: OBS Studio Voko Screen Kazam And I have tried with the ...
9
votes
4answers
6k views

.ssh/config way to specify pseudo-tty allocation and command execution

Is there any way to specify, in .ssh/config, a command like: ssh -t remote-host "screen -dR screen_name" so I can easily access the remote screen session with ssh remote-host? Right now I solved ...
49
votes
6answers
109k views

“su” with error “X11 connection rejected because of wrong authentication”

As root, I'm connecting to a remote host to execute a command. Only "standarduser" has the appropriate id-file and correct .ssh/config, so I'm switching the user first: su standarduser -c 'ssh -x ...
0
votes
1answer
15 views

Getting the last output from a stuck screen session

I have a very stuck screen session - I can see it in screen -ls, it shows as attached, but I can't detach it re-attach it, not even with "screen -D -RR". Trying the detach and re-attach in separate ...
10
votes
2answers
2k views

How to do block selection in `screen`

In vim, there's a CtrlV to do block selection. How can I do it in screen?
64
votes
6answers
151k views

How do I kill all screens?

I accidentally created over 1000 screens. How do I kill them all with one command? (Or a few)
0
votes
0answers
27 views

Got “Must be connected to a terminal” after the bash script run (screen -S screenName -d -m bash /root/RunServer.sh)

If I login to the Ubuntu 19.04 server via PuTTY ssh, I can just type the command screen -S screenName -d -m bash /root/RunServer.sh then everything works. But when the above command runs in the ...
0
votes
1answer
26 views

Linux start screen and run a java program and detach it?

I have the following script that should do the following: Stop screen "server" if exists Start screen "server" Run a java program and detach screen. However, when I firstly run the script, the ...
1
vote
1answer
28 views

screen logging - How to ommit interactive shell control characters and prompt?

One of my first questions. Please comment if further explanation or information is required or if the question is not like it's supposed to be here I'm using screen to automatically start servers (...
0
votes
1answer
20 views

Remote screen session

This is running me crazy: I want to use 4 screen windows (within the same session) in a remote server (GCloud) to process 4 subjects in a parallel way. Long story short: I first create a detached ...
2
votes
0answers
38 views

Redirect all keyboard input to a detached screen session

I'm trying to build a headless system using a Raspberry Pi; I have two programs runnning on it, one to catch all the input from a barcode reader (a simple keyboard emulation device) and one to display ...
1
vote
0answers
19 views

How to clear DISPLAY variable in GNU screen

Basically, i need to unset DISPLAY variable in screen if I run multiple commands like: screen -dmS name bash -c 'kodi; unset DISPLAY; emulationstation' I'm writing a little something that will ...
35
votes
4answers
25k views

nohup vs. Screen

In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use screen in this context. Does screen provide some kind of functional advantage that I am unaware of, ...
0
votes
0answers
11 views

running a terminal over PCMCIA serial port in unix

I'm currently doing a microcontroller project that requires a serial port, but for testing purposes, I require two serial ports and terminals working with both of them. My computer has one native ...
0
votes
2answers
490 views

Why doesn't Alpine's viewer command work within GNU screen and how can I fix it?

When I run the viewer command in alpine from within GNU screen it tells me "viewer command completed" but it doesn't actually bring up Lynx (or any other viewer). I even tried writing my own script ...
0
votes
1answer
908 views

screen command cannot find java executable

I'm trying to execute java from screen: screen -S my-java-app -d -m 'java -jar -Xms512m -Xmx2048m my-java-app.jar' but seems that screen does not know the java command. Running java without screen ...
3
votes
2answers
2k views

Screen - inherit current window's environment

In GNU Screen, how can I create a new window whose shell inherits the environment of the shell in the current window? The usual Ctrl+A C doesn't seem to do this.
0
votes
0answers
123 views

Start a screen with minecraft server after restart?

I am trying to have a minecraft server auto start on a screen after the server reboot. Currently using CentOS 7. Here's my minecraft.service i put in systemd. [Unit] Description=Start Minecraft After=...
5
votes
1answer
703 views

How to send input text (in screen) to serial port, a line at a time (not character at a time)?

I am using screen to communicate with arduino over serial port, i start screen like this: screen /dev/ttyACM0 115200 then I try to send a command but every key I press on the keyboard get sent ...
1
vote
3answers
1k views

Disable screen outputting “[screen is terminating]”

How do I disable the output when you are done with a screen from the screen command? Example: function foo() { echo "Testing..." sleep 2 echo "Done!" } export -f foo screen -q bash -c "...
30
votes
5answers
55k views

Setting a name for a screen session

Is there a way to give a particular name to a unix screen session? For instance, say I'm running the same program multiple times, each with different parameters and I want to tell which one is which.
6
votes
3answers
12k views

ssh from screen leads to unknown terminal error

I'm trying to make an ssh connection (via lsh) from one Ubuntu host to another from within screen. If I try to run mc right after that I get the following error: Unknown terminal: screen-256color-s ...
4
votes
3answers
2k views

list processes running inside of screen (manager with with VT100/ANSI terminal emulation)

I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list ...
4
votes
2answers
322 views

sleep command using screen command is not displayed in ps

I'm running the sleep command in terminal using screen and in detached mode. Once the screen immediately returns, I'm running ps command to verify the sleep is running. $ screen -d -m 'sleep 2m' [raj@...
21
votes
1answer
2k views

What does 'script /dev/null' do?

Every time I log into a VM with root, su into a user account, and try to use screen it throws an error: Cannot open your terminal '/dev/pts/0' - please check. A Stack Overflow post said I needed to ...
0
votes
1answer
38 views

Are processes within screen treated differently from foreground processes?

Assume I have a long running process, long_running_proc with a single TCP connection to host host.example.com. Is that process treated differently, by the OS or the shell, when it's run as a ...
17
votes
2answers
34k views

How can I switch between ttys without using screen?

So let's say you boot up your Linux install all the way to the desktop. You start up a gnome-terminal/konsole/whatever so you have a tty to enter commands to. Now let's say I SSH into that same ...
6
votes
3answers
5k views

How do I start a screen session using an upstart job with a non privileged user?

I am trying to create an Upstart job that starts a new screen session on boot, in which I would like to automatically start a java executable. Here is the .conf file I am currently trying to get to ...
14
votes
8answers
2k views

Suggested setup for an ultra-lightweight text-based programming environment in linux

I am looking for suggestions for a setup for my particular needs. I haven't done much linux since college and want to get back into it as a hobby. I have some not-too-powerful hardware (512 MB ram, ...
1
vote
3answers
6k views

How to run a program in a screen, redirect all output to a file and detach

Running a command in a screen and detaching is quite simple. screen -S test -d -m echo "output of command that runs forever" However I would also like to pipe all the output to a file for logging, ...
2
votes
3answers
3k views

Remove BS and ESC from Log files

Whenever I use the script command to record the keys I type or when I activate the logging mode in screen, all BS (Backspace) and ESC (Escape) key presses are also included in the file. e.g: cd ~/foo/...
13
votes
3answers
5k views

How do I highlight a search result in tmux?

When I search a terminal window in tmux, it sets the cursor the keyword search, but doesn't highlight the matching word. Screen used to do this, and it was much easier to visually find a match. ...
0
votes
1answer
1k views

Detach from screen session inside bash script

I would like to run a bash scrpit while using a screen session, here is my script : #!/bin/bash for i in 1 5 18 20 do screen -S output_${i} ./run_my_program screen -d The problem is that the screen ...
0
votes
2answers
1k views

Netcat as Daemon

I'm trying to set up something that telnets into a device and saves the output to file. I can get it working on the CLI, but not running it at boot (using crontab) This works running running on the ...
3
votes
1answer
85 views

Connected using screen over RS-232. How do I transfer a file to my local system?

I'm connected to a device over a serial cable and using screen I have full access to the remote system. How do I transfer an entire file(s) to my local system? Not just the contents of the file, I ...
0
votes
1answer
19 views

^a etc when running screen

I'm used to keyboard shortcuts like ^a (go to the beginning of the line) in a terminal session. When I'm running GNU "screen" (so I can resume an ssh session after packing up my laptop), a bunch of ...
2
votes
1answer
927 views

VT100 terminal emulation to use with a Java-based 8-bit computer emulator

I'm successfully using GNU Screen as serial terminal to "talk" to my Altair 8800 clone (http://altairclone.com/) using serial line. The command I use is: screen -istrip /dev/ttyUSB0 Screen does the ...
1
vote
2answers
488 views

Set up default GNU screen “screens”

I would like to set up GNU screen on my headless CentOS box such that when it starts up with some screens already running. My .bashrc file runs screen on the first login with screen -xRR and I would ...
1
vote
1answer
938 views

How can I use the host's keyboard for a 'remote' SSH session from a tablet computer?

The perhaps slightly odd requirement is this: I have a computer/laptop running Ubuntu I have an iPad from which I can SSH into said laptop sitting right next to it I'd like to use the iPad as an ...
39
votes
2answers
14k views

How to change default new window directory from within the tmux

I recently moved from GNU screen to tmux. I find it quite similar but with bigger support (I switched due to problem with escape-time in neovim- resolution was only for tmux). Unfortunately in tmux I'...
20
votes
2answers
11k views

Is there a way to make Screen scroll like a normal terminal?

I love screen, but it drives me nuts that I have to stop typing input, hit CTRL+A [, and then find what I need. Is there a way to make the scroll wheel function normally, rather than scrolling ...
2
votes
1answer
1k views

GNU screen startup is really slow

I connect to a RHEL 5.7 server via Putty or VNC (not sure it matters) but when I try to run screen, it takes forever (on order of 20-30 secs). Same thing if I run screen -ls, takes just as long. I ...
2
votes
1answer
971 views

My bash prompt is not working in `screen`

On RedHat, screen resets my bash prompt. I set PS1=\u@\h:\w in ~/.bashrc and ~/.bash_profile. I added shell -$SHELL as well to ~/.screenrc. But, when I open a brand new terminal window, the prompt ...
1
vote
1answer
40 views

Process ownership automatically changes to init process on GCP Ubuntu 18.04LTS

We recently moved our development infrastructure from our own old machines running Ubuntu 12.04 to Google Cloud instances running Ubuntu 18.04. Developers usually start some screens and run django ...
34
votes
3answers
29k views

How to rename a gnu screen session

I am running a screen session and I'd like to change it's name. I know that when starting a new screen session I can use the '-S' option to give it a name. How do I change that name once the session ...
1
vote
1answer
33 views

GNU Screen requires different permissions for chroot environment? /run/screen

I have my computer start secure shell in a chroot system at boot. (All the normal directories are bind mounted in the chroot system /run, /dev, /dev/pts, /sys, /proc). After logging in to the chroot ...
1
vote
1answer
1k views

Filter screenlog with screen command

Pressing Ctrl+A, H, lets me log output of the screen command. However, the output file is too large. Is it possible to apply a grep-like filter so that I can control what gets logged? For example, I ...
0
votes
1answer
1k views

How to change proxy setting manually in debian?

I want to change my system proxy settings manually with command line. What are the commands that allow to substitute this GUI operation on Debian 8.0? Going to the menu and accessing the Network ...
1
vote
4answers
305 views

Byobu / Tmux copy whole line

I use byobu in tmux mode. In screen I can do this: Ctrl+a [, move to line, Y, Ctrl+a ] "Y" copys the whole line into the clipboard. I am looking to something similar in byobu in tmux mode. The only ...