I've been trying to use screen's -R option which according to the man page
-R attempts to resume the first detached screen session it finds. If
successful, all other command-line options are ignored. If no detached
session exists, starts a new session using the specified options, just as if
-R had not been specified. The option is set by default if screen is run as a
login-shell (actually screen uses "-xRR" in that case). For combinations
with the -d/-D option see there.
I don't usually leave more than one screen session running on a box, so my
normal practive, having detached, would be to do screen -r but sometimes I
get the message about several screens found, and I have to specify one.
So, as I don't often deliberately leave > 1 detached screen on a box, I'd like
to be able to use -R and if that attached to a screen I didn't expect that'd
be OK, because it'd be a left over screen that I should deal with anyway.
So, from what I've seen on several screen versions, -r and -R work in the same
way. What meaning of "attempts to resume the first detached screen session it
finds" is the screen man page using when it describes -R ?
BTW - I know how to use -r, and I know how to use -x - what's puzzling me here
is only why -R doesn't work as advertised (or as I understand the man page).
I suppose the question boils down to "Does screen not work as it should with
-R, or have I completely misunderstood the phrase 'attempts to resume the
first detached screen session it finds' ?"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!