screen (GNU Screen) is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.

learn more… | top users | synonyms

19
votes
2answers
5k views

Why does redirecting 'script' to /dev/null/ allow 'screen' to work while su'ed as another user?

I was su'ed into a user to run a particular long running script. I wanted to use screen but I got the error message "Cannot open your terminal '/dev/pts/4' - please check." So I Googled around and ...
0
votes
0answers
10 views

Convenient way to restart server inside vagrant

We have a webserver, that needs nginx and other configurations, so for development we use vagrant. vagrant ssh I want to easily [re]start it, so I use single line ssh commands. vagrant ssh -c "" ...
1
vote
1answer
46 views

Debugging frozen Gnu screen session?

We've been using GNU screen on our jump box to have ssh sessions open to multiple hosts within our private network. One window per host. Recently we've built a new environment and are experiencing ...
3
votes
1answer
117 views

screen: how do I move a window in between 2 other windows

In screen is there a way to put a window in between 2 others instead of swapping? Here is what I have 1 - I want this to become #2 2 - I want this to become #3 3 - I want this to become #1 If I go ...
0
votes
0answers
4 views

nohup, screen and tmux not working when closing connection on yocto linux (intel edison) [migrated]

I have an Intel Edison with Yocto Linux and standard configurations. It had nohup pre-installed and I managed to install both screen and tmux (by compiling them from sources). Now, I would like to run ...
1
vote
2answers
73 views

screen command process id

First of all sorry for my bad english and i am new at linux. When i do this, it can write process id to pid file start () { echo -n "Starting someserver.jar: " java -jar ...
0
votes
1answer
63 views

Execute a service as a specific user under ubuntu

I'm running a gameserver and want to start it on a screen on system start, but screen is user specific, so I have to run the command as 'user'. So I wrote this short service script which starts itself ...
4
votes
2answers
3k 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 ...
5
votes
2answers
2k views

Start Unix screen, Run command, Detach

How can screen be used to start a new session and run a command within that session without killing that session? screen -S myScreenName runSomething I tried the above command and it says [screen ...
0
votes
2answers
37 views

GNU screen without output caching

For a long running script we are using screen to be able to close the ssh session without stopping the script. Screen, however, keeps saving the output which is resulting in a very high diskio. My ...
2
votes
4answers
2k views

gnu screen + putty

Anyone here who knows how to get the +-*/ on the numerical keypad to work in gnu screen from putty? Number work fine but not the operators. the / seems to be bind to renme the current shell or maybe ...
13
votes
3answers
10k views

Reattach or create a named screen session? (or persistent screen sessions)

Basically I have a remote screen session, which I wish to automatically reattach to.. Currently I'm doing this by with the following command (as an iTerm bookmark, or an alias) ssh host -t screen -x ...
0
votes
1answer
69 views

Docker attach to curses process

I'm trying to use docker attach to attach to curses-based graphical process: $ docker run --name irssi -it pandrew/irssi irssi When you detach from this process using ^P^Q and reattach with docker ...
0
votes
1answer
115 views

Unable to redirect STDOUT in a remote screen session via SSH

I would like to execute a long-running command via SSH/screen and have the output redirected to a file. I'm able to run the command fine (similar to this question), but the output never shows up. ...
5
votes
1answer
246 views

screen causes “tail -F | grep” to echo unmatched lines

This is Ubuntu (3.13.0-29-generic #53), trying to do a simple bash script to monitor a log file for matching lines. If I do the following, there is no output in the bash shell except for matches, ...
1
vote
1answer
131 views

No hangup signal by default [duplicate]

I have a server running ubuntu server. It is behind a proxy...I don't know if that makes a difference. But I have found that a couple of processes I've tried, get terminated when I log out of the SSH ...
3
votes
1answer
62 views

screen in screen, detach only last one

I have strange issue on my hands. I have opened (GNU) screen for one serial console and in that same console I have opened another screen to another serial console. It was working but I am now ...
0
votes
1answer
128 views

GNU screen 4.2.1 in xterm: hardstatus in window title disappears

The only 2 lines in my ~/.screenrc are: termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' hardstatus string "%h [screen %n%?: %t%?]" In GNU screen version 4.0.3 that I used previously, ...
43
votes
6answers
19k 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) I have a script that ...
7
votes
6answers
9k 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 ...
2
votes
2answers
1k 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 ...
0
votes
1answer
24 views

Starting a detached screen has no effect

I want to start a shell script in detached mode on ubuntu bootup (via cronjob @reboot) but it doesn't even work when I try it directly. Syntax: screen -d -m -S myscreenname /path/to/my/script.sh ...
2
votes
1answer
39 views

Is it possible to set a max amount of screens that can be running at once?

I'd like to know is it possible to set a max amount of screens that could be running at once on screenrc? Thanks
1
vote
1answer
52 views

Whic Command I Runnning Inside a 'screen'?

I have logged in in a server.Then issued the "screen -list" command which gives the following output - There is a screen on: 11048.pts-0.devops (Detached) 27563.pst-0.devops (Detached) 1 ...
20
votes
7answers
13k 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 ...
3
votes
1answer
413 views

Cygwin Screen and SSH: Utmp slot not found -> not removed

When I use screen on my computer and detach, I am taken back to the command prompt and everything is fine. However, if I SSH into my computer remotely and use screen, when I try to detach I get the ...
-6
votes
1answer
167 views

execute script at particular time in amazon ec2 linux [closed]

I am newbi in amazon ec2 as well as linux, I am working on pentaho kettle, for starting my job process i m using following command in amazon ec2 instance, cd /dev/pdi/data-integration (reaching to ...
0
votes
2answers
36 views

how to create a screen session within an existing screen session

Case scenario: When I open my terminal, screen starts automatically. This is useful because I often need multiple screens locally within the same terminal. However, if I connect via SSH to a server ...
1
vote
1answer
77 views

Byobu - How to disconnect from lxc-console

I am inside Byobu on ubuntu 12.04 and entered an lxc-console. Unfortunately, the escape sequence for lxc appears to be cntrl-a q. However this clashes with Byobu's which also uses cntrl-a sequence. I ...
-1
votes
2answers
312 views

How to setup `screen` command to run for every ssh session?

I'd like to record the activity for every ssh user connecting to my box. I think screen could help with it. I'm thinking on having screen running for every ssh user automatically upon ssh login and ...
0
votes
0answers
42 views

Script for creating a session with multiple tabs

I am new to screen utility in CentOS, I've seen this utility being used by OpenStack for logging different services. I am trying to imitate same with my custom script, but I'm unable to :( I've to ...
0
votes
1answer
136 views

How to use screen with mysql import

I need to import a very large MySQL table on remote server. Usually I'm using mysql -u mysql_user -pMypass db_name < sql_data.sql But it takes about 5 hours to complete the task. I tried using ...
2
votes
7answers
17k views

Remote Desktop Connection Screen is totaly black but server is working perfectly

Server is working perfectly but when I do RDC screen is only black. This happened before and I fixed it by powering off the server via KVM/IP, but I don't want do that again. How can I fix this issue. ...
0
votes
1answer
92 views

sudo su in screen — security issue?

Just logged back into a server and reconnected to an existing screen using screen -R. I had completely forgotten that I'd used sudo su - earlier and had not exited afterwards, so when I reconnected ...
18
votes
3answers
11k 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 ...
14
votes
4answers
3k views

How to check if I'm in screen session?

is it somehow possible to check if I'm right now in screen session? I need it to determine if hitting ctrl+d would disconnect me from server or just close current screen. Thanks.
0
votes
2answers
78 views

Cronjob screen PHP does not executed [duplicate]

If I execute the following in the terminal it works: screen -dmS tt-rss-daemon sudo -u www-data /usr/bin/php /usr/share/nginx/www/tt-rss/update.php --feeds --daemon If I write the following in a ...
0
votes
1answer
22 views

Unable to send command to newly created screen?

screen -dmS SIEGE_01 sleep 1 screen -S SIEGE_01 -X stuff "cd /home/ss12036/ImpulseNetwork/Servers/SIEGE_01/"`echo -ne '\015'` sleep 1 screen -S SIEGE_01 -X stuff "sh Start.sh"`echo -ne '\015'` ...
-4
votes
4answers
96 views

linux - screen command - how to kill a screen?

I'm using screen on my home server. I start it by issuing screen -dmS [name] Then, when I've connected I can Ctrl+A, n to jump between screens and Ctrl+A, c to create new ones... How, however, I ...
9
votes
2answers
406 views

Cannot reattach to a screen session after SSH connection was dropped

I have previously reattached to a long-running screen session with screen -dr control. However, sometimes this command will not reattach to the screen and instead hang forever (10+ minutes after which ...
0
votes
3answers
226 views

Linux: Connect to another a terminal session

I can use screen or tmux to connect to other terminal sessions, or to share them. But this work only when we first know we will use them. As root can access everything, is there a way to do the same ...
60
votes
12answers
64k views

How to reconnect to a disconnected ssh session

Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we ...
1
vote
1answer
93 views

krenew command not working : Permission Denied

I am using a Linux server to perform my simulations. The login and the file-system of the server are protected using kerberos. The file-system is supported using NFS. Since my simulations take a lot ...
-1
votes
1answer
104 views

Gnu Screen: How to specify a .screenrc file on startup? [closed]

Is there a way to launch Screen with a specific .screenrc file, instead of the one in my home directory?
2
votes
2answers
1k 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
1answer
46 views

Ubuntu - Abnormal behavior on “screen” command [closed]

I'm trying to send to the background "bitcoind". $ screen bitcoind -daemon & [1] 5289 Then I query for this process PID and the PID have changed $ ps -ef | grep bitcoin someuser 4003 1 ...
4
votes
1answer
766 views

nohup vs screen vs ? for manually starting daemon processes

When I need to start a background process on a low-importance server, I tend to use nohup: nohup ./server.sh & Most colleagues seem to prefer screen: screen -D -R mydaemon ./mydaemon.sh ^A ^D ...
1
vote
1answer
82 views

SCREEN: Permissions and security

I was just looking for some clarification on the screen command and permissions: I ran this command to allow the user to view their detached screen. Otherwise the user could not view their detached ...
0
votes
2answers
323 views

Clean up orphaned screen sessions for defunct users

I've run into the problem where I have users logging in to servers under customer accounts, opening a screen session as that user, and then never closing it. Ordinarily this wouldn't be much of a ...
2
votes
0answers
98 views

Exiting copy / scrollback mode upon detach in byobu / screen

I've discovered that if I go into "copy mode" or "scrollback mode" in a byobu screen, detach from it and leave it running, the buffer will fill up and eventually block the process I'm running in the ...