screen

Hi all,I want to use screen to keep paermanent sessions that I would be able to connect later on remotely, close them and still keep my scripts running.My problem though is I can not remember how to start correctly a session that can be later on retrieved back (how to exit the session and keep it running?)For example I started already a session with screenand I have some scripts runningwhen I write screen -R I can see the sesion running but it does not seem I can attach to it.Can someone give me more details about this application?RegardsAlex


screen -x

This reconnects to a session, whether or not somebody is already
connected. Normally if somebody is connected (attached) you cannot
connect, but ‘x’ helps there.

To disconnect use Ctrl+a followed by ‘d’ (disconnect). The terminal
should show ‘screen detatched’ as I recall. You can also use ‘screen -ls’
to show available screens.

https://www.suse.com/communities/conversations/ljdt-taking-advantage-screen/


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Last login: Wed Mar 4 22:54:14 2015 from gate.inets.rwth-aachen.deuser@host:~$ screen -xThere are several suitable screens on: 81123.1 (04.03.2015 23:00:38) (Attached) 80383.pts-15.host (04.03.2015 22:54:19) (Detached) 59305.pts-4.host (24.02.2015 15:53:37) (Attached)Type “screen -d] -r [pid.]tty.host” to resume one of them.what should try next?RegardsAlex

If you have multiples then use the -x option and specify a PID to connect:

screen -x 59305


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…