I'm writing a script which needs the name of the currently attached screen session's name if there's any.
Asked
Active
Viewed 1.0k times
9
-
see http://stackoverflow.com/questions/2479683/how-do-i-display-the-current-session-name-or-sockname-of-a-screen-session-in – Tamil Selvan C May 31 '13 at 02:44
1 Answers
19
You might want to check answers here: How do I display the current "session" name or "sockname" of a screen session in the status bar?
In short the $STY environment variable is what you are looking for.

Community
- 1
- 1

Martin Mrazik
- 396
- 2
- 3