APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

01/27/2003 05:40 PM unix "screen"

01/27/2003 05:40 PM unix "screen"

I've been trying to figure out how to use screen automatically. I have used it myself manually: login, run "screen -D -R" and if I was previously disconnected I'm reconnected to whatever I was doing. If not, it just starts a new session.

But typical users don't want to type that - they just want to go into their application automatically. I thought that would be fairly easy, but so far it hasn't been. I must be missing something very basic.

I thought something like this would work as a logon script:


M=`screen -ls | wc -l`
echo $M
case $M in
  4) args="-D -R";;
  *) args="/usr/bin/myscript";;
    esac
eval screen $args
 

and it ALMOST does, but the first session of myscript doesn't get detached. I keep staring at this..



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> 01/27/2003 05:40 PM unix 'screen'



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us