I need it to determine if hitting ctrl+d would disconnect me from server or just close current screen
.
Is it somehow possible to check if I'm right now in screen
session?
consolegnu-screen
I need it to determine if hitting ctrl+d would disconnect me from server or just close current screen
.
Is it somehow possible to check if I'm right now in screen
session?
Best Answer
You can look at the
$STY
variable (a variable set by the screen command). If it is not "" then you are in a screen session.I am in screen
I am not in screen