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

Questions tagged [gnu-screen]

GNU Screen is a software application that can be used to multiplex several virtual consoles.

2
votes
3answers
257 views

Lock down a linux system with screen

I need to lock down a system so that a group of individuals can log into the server via ssh. When they log into ssh I would like them to be presented with a screen session and locked down to that ...
87
votes
3answers
30k views

How to reload screenrc without restarting screen?

After modified screenrc, how to see the changes without restarting screen?
1
vote
1answer
2k views

How can I force gnu screen to flush its logfile?

I am using screen like this: screen -L -dm -S session1 -c "./game_server -options" to wrap around game servers. I log their output to a file, and can send them input with: screen -r session1 -p0 -X ...
1
vote
2answers
2k views

Centos start script for 'screen'?

I have a program that runs in the foreground so I run it via a 'screen'. Is there a good start/stop/restart template for 'screen'? I need it to pass the commands to the screen and create it if it ...
2
votes
1answer
2k views

How to get GNU screen to dynamically set gnome-terminal's title everytime I switch to different windows of a screen session?

Question title says it all. I am not able to tell which window of my screen session I am in, to find that out I am having to view ^aw (window list) and look at the where the * is to tell which window ...
1
vote
1answer
741 views

Destroy a dead window in Screen

I know I can kill the current window using C-k, however it doesn't work for a dead window. Is there anyway to kill it? Thank you. C-a C-k (kill) Destroy current window.
0
votes
1answer
417 views

Linux Screen; How do I make screen persistent with the -X command?

I'm running screen with the following command: screen -dms -X buildscript.py This executes the buildscript.py file and runs it as a daemon. Now, when the build script fails, screen automatically ...
4
votes
3answers
2k views

How to I use Vim's increment (Control-a) when in a screen session?

Is there a way to re-map Control-a in screen to Alt-a or something else, so I can use Control-A in Vim normally (increments the number under the cursor)?
23
votes
5answers
20k views

Is there a way to make a “Screen” session survive reboot?

I am using the Screen utility and would like to preserve the session when the machine reboots. If not possible may be you can recommend other alternatives to Screen that would allow to preserve the ...
2
votes
1answer
104 views

Prevent Screen from creating sub shells

I'm running a Linux system that starts a custom text mode application from the .bashrc. The users are getting disconnected due to network dropouts. I had the idea that I'd use screen to allow them to ...
0
votes
1answer
355 views

GNU/Screen - Large UTMP file and memory usage

I'm running a Fedora 12 x86-64 OpenVZ VPS and screen is using lots of virtual memory (98000+). I've also noticed that the UTMP file grows enormous over time: [root@demon~]$ date Wed Sep 8 22:02:58 ...
68
votes
6answers
76k views

Can I send some text to the STDIN of an active process running in a screen session?

I have a long-running server process inside a screen session on my Linux server. It's a bit unstable (and sadly not my software so I can't fix that!), so I want to script a nightly restart of the ...
7
votes
2answers
5k views

Password for GNU screen lockscreen command?

I have set a password for screen sessions in my .screenrc. It works great, any time I need to re-attach to a screen session I need to enter the password. There is another feature where you can ...
4
votes
6answers
1k views

What are the benefits of using screen?

man screen: Screen is a full-screen window manager that multiplexes a physical ter‐ minal between several processes (typically interactive shells). Each virtual terminal provides the ...
1
vote
1answer
738 views

Screenrc Settings to get status of Remote Server

I frequently use ssh within screen to connect to a set of machines. It would be ideal to have the caption line show information about the server that I am ssh'd into (eg machinename, uptime and info ...
4
votes
2answers
786 views

screen / autossh question: easiest way to transparently integrate screen into my ssh?

I'm a bit new to screen and autossh: I'm simply looking to "fully automate" my ssh sessions, make them implicitly persistent, and have them automatically restore should my connection drop. I've ...
1
vote
2answers
1k views

Getting a custom .bashrc available in ssh session

Currently, we have quite a lot of shared ssh logins to various servers, and my colleagues wouldn't like it if I fiddled with the default shell to much. I do however have quite a list of aliases and ...
1
vote
1answer
935 views

screen not setting $TERM to screen

I have a problem with gnu screen. Computer 1: open terminal $ printenv TERM xterm-color $ screen $ printenv TERM screen Computer 2: open terminal $ printenv TERM xterm-color $ screen $ printenv ...
0
votes
2answers
287 views

Is there a way to block screen's multi display mode (-x) completely?

I'd like to configure screen to only allow attaching to detached sessions and not to attached sessions, even if they're from the same user. Is there a way to accomplish this? I couldn't find anything ...
0
votes
2answers
486 views

automatic ssh logout not working due to screen caption setting

I have set up an automatic logout for idle ssh session using "ClientAliveInterval 7200" However I do not get logged out everyone else who uses the server gets logged fine. I have tracked the ...
3
votes
2answers
3k views

Terminal Width issues with Linux Screen

I'm having issues where when I'm in a regular SSH terminal, with $TERM set to xterm-256color, and the terminal width is very small (narrow) in Linux Screen. I'm running Arch Linux. When I'm in the ...
11
votes
4answers
8k views

Run (GNU) Screen from script

I would like to launch some application inside screen session but from a script. Without script I would just launch screen, then open N windows with crtl-a-c and execute programs in each windows. I ...
3
votes
2answers
5k views

How to automate starting a multiuser screen session with adding acl to another user?

I often start a screen session, issue a ":multiuser on" command and then ":acladd someuser". Is there some way to get with a single shell command a screen session to start with these two commands ...
2
votes
1answer
315 views

Is there a way to configure the 'logfile' directive when invoking GNU screen from the commandline?

I have been using gnu-screen's 'logfile' command to log my session histories when making production changes. I like to log each change in a different directory; this means that whenever I start a new ...
6
votes
3answers
1k views

Can I create and manipulate unix “screens” in a script?

I have a work environment on my Ubuntu laptop in which I want to use three different screens. Eg. in terminal, I usually write screen -S mywork run_server_1 then, ctrl-a c to create a second ...
11
votes
1answer
6k views

.screenrc - multiple regions on launch

I know it's possible, but I can't for the life of me figure out how, to launch screen with one window in split region mode? ie: I have screen set to open multiple windows on launch, but want window 0 ...
1
vote
1answer
1k views

screen -Amds screenname /patch/to/script.sh don't work only on debian

I have a problem with screen software, when I try to start screen with options screen -Amds screenname /patc/to/script.sh - nothing happens, it's a problem only on Debian system. On CentOS and FreeBSD ...
8
votes
2answers
4k views

Wrap current session in a screen session

I started an big operation, but I didn't start a screen session, So i can't disconnect without canceling the operation. Is there a way to inject screen so that the operation continues and sends its ...
3
votes
2answers
5k views

Running screen without root

I recently updated screen on my server and for some reason when logged in as a normal user I can no longer create a screen session. If I run sudo screen it works. It's probably a permissions error ...
0
votes
3answers
1k views

How to kill all screens that has been up longer then 3 weeks?

Im creating a script that i am executing every night at 03.00 that will kill all screens that has been running longer than 3 weeks. anyone done anything similar that can help? If you got a script or ...
1
vote
2answers
113 views

What is the best way to apply your old settings / environment to new server

Let's say you have your favorite settings with zsh, vim, screen, etc., behaving the way you want on some boxes. What is the best way to apply these settings / environments to a new server? Assuming ...
6
votes
2answers
1k views

How to know who is conected to my screen and where on the screen he is?

I use screen, and sometimes I'm forced to share it. How I can manage the active connections to my screen? I would like to monitor connections and users connected, where they are and what they do. ...
2
votes
4answers
554 views

GNU Screen: one window per screen or one screen with multiple windows?

I've inherited a few sys admin tasks recently and am trying to wrap my head around using screen. The way the previous guy left it, there are four screen sessions running, some of which have two or ...
3
votes
1answer
747 views

unix screen logging change filename to window name

I know its possible to change the name of the logfile with "set filename" I'd like to have screen write its log files to the name of the window. how can I accomplish this ?
1
vote
2answers
610 views

Kill named running screen with -X only works after reattached

I am using ubuntu 8.04.4 and would like to start daemons like this: screen -dmS SESSIONNAME script.sh Then i want to kill these screens with -X like so screen -S SESSIONAME -X kill But, this does ...
33
votes
8answers
32k views

Using ctrl-arrow keys with PuTTY and screen

I searched and couldn't find a solution for this anywhere. I'm using PuTTY from Windows to connect to various servers where I run bash and screen. It seems bash works fine with ctrl-arrow keys to ...
0
votes
1answer
902 views

Better Method of Opening TTY Permissions

At work, I have a few legacy servers that I log into as root, and then su down to a user. I continue to run into an issue where after doing so, I am unable to run screen as this user. I don't want to ...
36
votes
8answers
31k views

How do I ask screen to behave like a standard bash shell?

Just learned about the screen command on linux - it is genius. I love it. However, the actual terminal/prompt in screen looks and behaves differently than my standard bash prompt. That is, the ...
3
votes
4answers
1k views

How to use cursor keys in vi under screen?

If you run vi/vim in screen, when you press a cursor in insert mode, you get a new line + a character, which is a pain. How can I configure vim to move around instead?
164
votes
7answers
81k views

Sudo as different user and running screen

Found out today that running screen as a different user that I sudo into won't work! i.e. ssh bob@server # ssh into server as bob sudo su "monitor" - screen # fails: Cannot ...
2
votes
1answer
349 views

Windows client for GNU Screen

I'm very happy with Putty running on my Windows machine and keeping all my terminal windows under GNU Screen in my server. However, I wonder if there's a version of Putty (or another software for that ...
6
votes
2answers
3k views

What's the difference between hardstatus and caption in GNU Screen?

I've started to play with GNU Screen setting. What's the difference between hardstatus and caption in GNU Screen? hardstatus seems to appear at the bottom on the Terminal, but I don't even know what ...
2
votes
2answers
913 views

SCREEN setup tips

How do you use the "screen" tool ? I'm looking for best practices and config tips : To keep clean and ordered sessions on several servers To have a beautiful colored interface To have a fully ...
27
votes
6answers
77k views

Create screen and run command without attaching

I am working on automating a maintenance routine that involves starting and stopping a script that is running in a screen session. My approach is to kill the screen session, and then restart it and ...
3
votes
1answer
2k views

detach screen session

I have an attached screen session where I am running some jobs. I closed its terminal without detaching it because it does not respond suddently. Now by screen -ls I can see it is still attached. But ...
11
votes
8answers
17k views

Can't get detached screen to resume

I use putty and have an unreliable wireless connection, so I use screen to keep my work going. Often I'll get disconnected, and then I can't reattach my screen. I'll run screen -D -RR and it will just ...
19
votes
6answers
44k views

kill a screen (but not all screens)

I have multiple screens running on an Ubuntu server that are initiated as: screen -dmS screen1 cmd screen -dmS screen2 cmd etc... And I need to kill one screen, but not all of them. What is the ...
3
votes
3answers
1k views

GNU screen configuration for optimal keycode recognition

Currently GNU screen will botch up certain keystrokes, for example CTRL pressed in combination with the arrow keys, so that eg when in vim insert mode, CTRL-PGUp will Uppercase the next/current word (...
0
votes
1answer
2k views

Putty + Screen Auto Terminating Screens

I'm running screen inside a putty terminal. The problem I'm having is after a while of inactivity inside a screen, the screen automatically kills itself. So when I do things like run something ...
5
votes
4answers
4k views

GNU screen loses (parts of) command histories

I use GNU screen with 5 different sessions, each of which stores its own command history. But often I don't find a command in the history, although I'm sure I've used it exactly in the session I'm ...