is it somehow possible to check if I'm right now in screen session? I need it to determine if hitting ctrl+d would disconnect me from server or just close current screen. Thanks.
|
feedback
|
|
You can look at the
I am not in screen
| ||||
feedback
|
|
You can look at the $TERM variable.
If it's a
Ctrl-a -d (to exit screen)
Also check: http://stackoverflow.com/questions/3472287/how-do-you-tell-if-the-current-terminal-session-is-in-gnu-screen | |||
feedback
|
|
I have found another solution: | |||
|
feedback
|