# # 01/27/2003 05:40 PM unix 'screen'
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

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

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.

Some material is very old and may be incorrect today

© March 2003 Tony Lawrence

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";;
eval screen $args

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

If you found something useful today, please consider a small donation.

Got something to add? Send me email.

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

Printer Friendly Version

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

Inexpensive and informative Apple related e-books:

Are Your Bits Flipped?

Take Control of Pages

Photos: A Take Control Crash Course

iOS 10: A Take Control Crash Course

Take Control of Parallels Desktop 12

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

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

Printer Friendly Version

The easy confidence with which I know another man's religion is folly teaches me to suspect that my own is also. (Mark Twain)

Linux posts

Troubleshooting posts

This post tagged:


Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode