3

When I logged in a server and issue a 'screen -list' commands it gives the following result -

31917.pts-5.office      (Detached)
31844.pts-0.office      (Detached) 

But it is sometimes important to know who has start the screen session - eg.- as system admin may want to kill some specific screen session and when it's important to know who start the session. Is there any way to know who is initiator/owner of the screen session?

Thanks

  • What is your distro ? – user9517 Feb 20 '16 at 18:12
  • I'm using ubuntu 12.04 – Razib Feb 20 '16 at 18:24
2

The screen -ls | screen -list commands only show you your own screen sessions even for root. As far as I know that's as good as it gets for screen itself.

If you want to see which screen sessions have been started by which users look in each users directory in /var/run/screen/

ls -lR /var/run/screen
/var/run/screen:
total 0
drwx------ 2 iain iain 80 Feb 20 18:14 S-iain
drwx------ 2 root root 60 Feb 20 18:19 S-root

/var/run/screen/S-iain:
total 0
prw------- 1 iain iain 0 Feb 20 18:13 4093.pts-0.host1
prw------- 1 iain iain 0 Feb 20 18:14 4105.pts-0.host1

/var/run/screen/S-root:
total 0
prw------- 1 root root 0 Feb 20 18:19 4128.pts-0.host1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.