Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

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 "...
4
votes
0answers
584 views
+100

How to send input text in screen serial console?

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 ...
29
votes
5answers
49k 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.
5
votes
3answers
11k 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 ...
3
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 ...
1
vote
0answers
575 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 ...
4
votes
2answers
283 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@...
20
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
35 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 ...
16
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
5k 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
985 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
76 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
910 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
394 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
917 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 ...
35
votes
2answers
13k 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
10k 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
955 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
39 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 ...
31
votes
3answers
27k 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
22 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
286 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 ...
3
votes
2answers
7k views

Remotely starting a screen session through ssh and closing the ssh session immediately

My goal is to remote to a server through ssh, start a screen, start a script, let the script run, and exit the ssh session while keeping the screen running its own python script. This is what I have: ...
1
vote
0answers
40 views

How to Attach Screen Sessions that were Split

I am working with screen and I am having a hard time with reattaching sessions where I split the screen within one session. Is this even possible? I have tried searching for it on here and google ...
0
votes
0answers
9 views

How to create custom key binding for the paste command in GNU screen?

In screen, the keyboard shortcut ^a ^] runs the paste . command. I want to define an additional custom key binding for that command in .screenrc with the following line: bindkey "ñ" paste . In my ...
14
votes
4answers
27k views

terminate screen monitoring serial port

I am using screen /dev/tty-MyDevice to look at traffic on my serial port. Pressing Ctrl+D does not cause the screen to terminate. What I have to do in order to terminate it?
6
votes
2answers
3k views

screen fails with “WriteMessage: Bad file descriptor”

I have screen session "main", started in /dev/ttySAC0 and sh, started in /dev/ttySAC0 (outside screen session) with input, output and error streams, redirected to pseudoterminal /dev/pts/1. When I ...
5
votes
2answers
418 views

Export content of screen daemon to file

I'd like to export the content of a detached screen under linux. I tried those command: screen -x 2>&1 > temp screen -x > temp 2>&1 screen -x > temp But it's not working, It ...
1
vote
1answer
33 views

Desktop environment that raises terminal with gnu-screen instead of starting new one

I want to start a gnu-screen session, in a terminal, from gnome. I wrote the following desktop file [Desktop Entry] Version=1.0 Name=Screen Comment=Use the command line Keywords=shell;prompt;command;...
0
votes
0answers
17 views

`screen` not creating log file when run inside tmux/byobu?

When we use screen command with -L option, it creates log files of the session with names like screelog.0, screenlog.1 and so on. These log files are created inside the directory in which the screen ...
0
votes
2answers
61 views

Screen session doesn't close after script has run

I write a bash file, which contains screen commands. This bash file is then called from a python script using subprocess. All works perfectly fine. However, the screen sessions don't close after the ...
12
votes
1answer
4k views

What triggers this screen prompt “Screen used by <username> on host01.”?

Every now and then some key combination clears my working (Gnu) screen and brings up this message: Screen used by <username> on host01 Password: What key combination causes this and what does ...
1
vote
0answers
41 views

Detached GNU screen session unexpectedly killed upon terminal close

I am using GNU screen for years now on several servers with the same configuration and never ran into this strange problem: After connecting to the server via SSH I start screen (without options). ...
4
votes
1answer
527 views

How to share GNU Screen sessions

I want to share a screen session, but this is harder then it seems for me. What I did was yum install screen then I made a session with root screen -S test. After that i made it multiuser Ctrl+A :...
1
vote
2answers
2k views

Script to su -c into a screen is not working as intended

I'm working on a script that will allow me to load up a screen from a user via sudo and su -c. However, when I use it, it will just show the shell of the user: sudo su -c "script /dev/null; screen -r ...
9
votes
2answers
2k views

Screen status bar multiple lines

I am using screen with several tabs open to separate my projects between them. However, when I open too many tabs they just appear off screen and I can no longer see them in my "screen status bar". I ...
1
vote
1answer
46 views

Get a list of children process ids (PIDs) running in a screen session

How can I run a command that lists all PIDs of the processes running under a certain screen (suppose multiple bash processes are running, because I have opened multiple tabs)?. I found the following ...
0
votes
1answer
125 views

Can attaching to tmux sessions be password protected, similar to gnu screen?

I've been using gnu screen for many years, and I've been looking into switching to tmux. I can't figure out how to make tmux require a password when attaching to a session. In gnu screen, I use ...
4
votes
2answers
847 views

What is the text command for naming a window in gnu-screen?

I have created a long running screen session with many windows and the C-a A command to rename a window is not working. What is the text command for renaming a window? I have tried :caption string ...
1
vote
0answers
30 views

How to keep screen running after exiting the command that runs in it?

I have the task to start a detached screen session (e.g. when the system reboots) and then to be able to connect to it and interrupt/kill the running process without the screen to terminate. ...