The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

Filter by
Sorted by
Tagged with
31
votes
5answers
12k views

How can you change the GNU screen status line based on hostname?

I have a shared home directory that is automounted via NFS on all the UNIX servers I log in to. I would like to have a single .screenrc that (for example) puts the hostname in the hardstatus line in a ...
12
votes
6answers
5k views

How to effectively use screen and SSH?

I'd like to configure SSH and screen such that a login will always reattach to a screen session. Ideally, that session would not quit but detach when I press C-d. How can this be achieved? And what ...
18
votes
3answers
9k views

Ctrl-a does not take me to the beginning of the prompt while I am working within a GNU screen

To navigate to the starting and end of a command, I usually use Ctrla and Ctrle. However, when I work within a GNU screen, those keybinding do not work becuase perhaps they are being used by the GNU ...
9
votes
2answers
15k views

Find out which command is running within a screen session

I often leave tasks running within screen so that I can check on them later, but I sometimes need to check which command is running within the screen. It's usually a php script of sorts, such as ...
22
votes
2answers
8k views

GNU screen: move between regions

I've started splitting window in GNU screen into different regions - rather than switching between windows. Anyway, having split a window into 4 regions (2x2) it takes 3 C-a <Tab> to return ...
12
votes
3answers
3k views

GNU Screen window rename nuisance

I like to pop up a screen session with pre-opened SSH connections to the primary servers that I administrate at the office. I give these windows each a very brief name, typically 2-4 characters, so ...
9
votes
2answers
9k views

Connect to byobu screen session and execute command?

In a script I am building I'm experimenting with how to automate as much as possible. One of the more interesting challenges is to connect to a byobu screen session and execute a command. So I ...
3
votes
4answers
12k views

Running `screen` through a @reboot cron job

I want to have a script running in screen at startup. This doesn't work: @reboot pi screen -d -m /home/pi/db_update.py however running this manually as user pi works: screen -d -m /home/pi/...
21
votes
5answers
21k views

Attach multiple times to a single screen session

I've been using screen -dRaA -S x to open up a single session between different workstations as I move about. Handy. Is it possible to connect multiple times to a single session, though, without ...
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. ...
7
votes
1answer
4k views

Nested ssh session inside screen has no color

I am attempting to keep a nested ssh session inside of a byobu/screen window, which I also connect to over SSH with Putty on Windows. However the nested SSH session has no color. Here's what I'm ...
7
votes
2answers
2k views

GNU Screen makes Vim ESC key slow

Screen makes my ESC key wait for more commands I believe, and if it does not get those commands, it sends it to my terminal session (which I am running VIM in). ESC is used a lot in VIM and ...
7
votes
4answers
21k views

Keeping a process running on server even SSH is closed [duplicate]

I am running long program on server, which is basically Jar file of java program. I want to keep this program running even if SSH terminal is closed, how I can keep this program running on server?
9
votes
3answers
4k views

GNU screen - Restore a session with splitted screen

When I restore a splitted session of screen, I've got only one print session and have to reconfigure the number of display session. Is there another way to have the original screen configuration?
3
votes
4answers
6k views

Leave remote command running storing output

Scenario; I have SSH'ed to a machine, opened a new screen session, and fired off a script. Some days later I SSH back to that machine, re-attach the screen session and look at the output that has ...
3
votes
2answers
727 views

GNU Screen: Strange TERMCAP when using -d -m

Depending on how I run screen, it either does or does not have the right TERMCAP info. The symptom of this is that colors don't always show up in my terminal correctly (eg: ls, vim syntax highlighting,...
2
votes
2answers
1k views

Stop systemd service by sending command to screen session

I run Biglybt as a daemon inside a screen session using the following command screen -c /home/pi/.screenconf -L -dmS Biglybt_screen /usr/bin/java -cp "/usr/share/java/jna.jar:/home/pi/biglybt_stock/...
13
votes
2answers
9k views

Change the parent process of a process?

Is it possible to change the parent process of a process? If yes, how? For example, how does screen manage to attach a screen session and the processes running inside it to different shell ...
8
votes
2answers
14k views

How can I start a 'screen' session as non-root user

Is there a way I can open a new 'screen' session on my RHEL box as a non-root user? When I try to open a new screen using the 'screen' command as a non-root user, it fails and I get the following ...
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 ...
4
votes
1answer
2k views

How to bind 'tab' and 'shift+tab' in GNU screen?

How do I bind the keys Tab and ShiftTab in screen? My problem is that I don’t know what to pass to the screen bind command to designate these keystrokes. BTW, I’m aware of GNU screen: move between ...
4
votes
2answers
3k views

How to prevent screen from terminating once process ends [duplicate]

I'm launching a process in a named screen like: screen -dmS myscreen bash -c "export VAR=123; cd /usr/local/myproject; ./myscript.py" However, after a few minutes, my script crashes and when it ...
3
votes
3answers
202 views

How to search for a suitable “command character” for GNU-screen?

I'm having a hard time finding a "command character" for GNU-screen that does not collide with some key combination that I already use. Through Emacs (and org-mode, and my regular shell, etc.), ...
2
votes
3answers
8k views

Do I really need -dmS option in screen to run background job stably even log out?

I saw many place introduce screen to run background job stably even log out. They use screen -dmS name According to screen -h, this option means -dmS name Start as daemon: Screen session in ...
2
votes
3answers
4k 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/...
0
votes
1answer
207 views

How to work around terminal artifacts when using dialog program under docker, running in a screen session

all. The question is about the setup that you can find here: https://github.com/filmil/bugreports/blob/master/dialog/README.md I noticed that running a dialog utility in an interactive docker ...
0
votes
2answers
538 views

Linux: Making “screen” sessions persist in Debian “jessie”

EDIT: The initial premise of this question was that screen didn't work properly on stock Debian Jessie, and I was looking for workarounds. This turns out to be an artifact of a low sample size -- I ...
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 ...
8
votes
1answer
2k views

How does `screen` actually work?

I just learned about screen and it looks wonderful. Some questions: How do they actually work? Why are downloads / process not interrupted in screens even though something bad happened?
6
votes
1answer
2k views

Make screen work like a terminal (scrolling + alternate screen) [duplicate]

I would like to use screen (from GNOME Terminal, via ssh) like I use GNOME Terminal without screen, or as close as possible to that. Specifically: In GNOME Terminal, I can scroll back using the mouse ...
4
votes
2answers
1k views

screenrc subshell for every window

.screenrc: shell -${SHELL} caption always "%n(%t) %= %{b}@%H[%l] : %{r}%c:%s" termcapinfo xterm ti@:te@ termcap xterm 'AF=\E[3%dm:AB=\E[4%dm' terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' ...
4
votes
3answers
589 views

Replacement shortcuts for `screen` [closed]

Screen uses the shortcut CtrlA to activate. I find that this interferes with the Bash command for jumping to the start of the line, and the VIM command for incrementing an integer. Certainly I could ...
3
votes
1answer
2k views

Terminal: termcapinfo command not found

I added the following line to my .screenrc script such that I can use my mouse to scroll up and down in the terminal when the output is too large and long. However, when I try to source .screenrc ...
3
votes
1answer
1k views

how to force `screen -L` to overwrite log?

I want to run some long calculation jobs in the background. I choose screen. However I found screen didn't accpet redirection. for example screen -dmS name ls>ls.dat won't generate ls.dat. ...
3
votes
1answer
1k views

X Window opened from screen

Bit of an oddish one, if I've opened an X window over SSH in a screen session will it reopen when screen is reattached? I've been able to detach and the process stays running fine, with the X window ...
3
votes
1answer
530 views

Convert screen log to html

I would like to log actions made in a terminal window, and convert the log to html on fly. I already tried commands script/screen + ansi2html, but the result is not perfect: the escape sequences for ...
3
votes
1answer
841 views

emacsclient connection refused

I am running emacs in daemon mode and I got dissconnected from the server on which it was running. After re-connect, when I run emacsclient -nc I get the error connect localhost port 6012: ...
2
votes
2answers
255 views

How can I get a confirmation before exiting screen?

How can I get a confirmation before I exit screen (when typing exit on the command-line). Is this possible?
2
votes
1answer
83 views

Why doesn't `netstat` show Screen client but only Screen server process?

From https://unix.stackexchange.com/a/485290/674 Further down in the netstat output is UNIX sockets: Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State ...
2
votes
1answer
3k views

What happens to screen session over ssh when connection is lost? [closed]

I ssh to a remote computer, and create a screen session there. Then I lose the internet connection. When I ssh again to the computer, I want to see if the created screen session is still there, so I ...
1
vote
0answers
75 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). ...
1
vote
1answer
262 views

Curses interface has blank spaces under GNU Screen and ssh

I'm trying to run an application sbopkg that uses a curses interface in an ssh session running under GNU Screen (Tmux also has the same behavior). If I run ssh directly from the terminal emulator (...
1
vote
1answer
1k views

Using cron to start a process on a terminal without using screen?

I want to start a process in a terminal using cron. I want the process to start in a terminal, so that I can continuously see the output of the process on the terminal, and kill it / restart it etc. I ...
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, ...
1
vote
0answers
244 views

Starting a minecraft server using screen doesn't work properly

I'm trying to run a minecraft server on my vServer. Everything works properly when I start the server like this: java -Xmx1G -Xms1G -jar minecraft_server.jar nogui But I want the server to run in a ...
1
vote
1answer
233 views

problem with U-boot while flashing Linux in sd-card

Please help as it is immense necessary for a project which is to be evaluated coming week. Also, I am very new to this and unable to find help from existing contents available on the Internet. While ...
1
vote
2answers
419 views

Why do you need screen/tmux to keep a remote program running

When I ssh to a server and start a script that is supposed to run for several days, it stops executing some time after I log off. Why? I suppose the server runs 24/7. And what does screen/tmux do to ...
0
votes
1answer
323 views

Circumvent deletion of screen session and nohup processes on logout

Everywhere I look I see that screen is for keeping a session open so that you can come back to it after disconnection. But this doesn't seem to be the case for a system that I ssh to. Do I ...
0
votes
1answer
505 views

attach to tty running a process

I have a systemd service file that runs a java program in another tty [Unit] Description=java program After=network-online.target [Service] Type=simple ExecStart=/usr/bin/java -cp "/home/user/...
-3
votes
1answer
188 views

kali linux stuck on gnome display manager [closed]

Everytime I start Kali linux, it boots nominally, until it reaches "[ OK ] Started GNOME Display Manager" where the Konsole gets stuck How to fix ?