How to reconnect a screen session every time terminal is fired?

0

I wrote this command to reconnect an active screen session when Terminator is opened. It works find but there has got to be a better way to to it

This is goes in the Terminator config file (note myhost is my computer name)

r=$(screen -ls | awk '{print $1}' |grep myhost); screen -r $r

Randim

Posted 2012-01-13T20:22:19.403

Reputation: 1

Answers

2

Yup, definitely over-complicating things:

screen -R

Where:

-R -- reattach if possible, otherwise start a new session

Johnsyweb

Posted 2012-01-13T20:22:19.403

Reputation: 2 324