serial-portgnu-screen

GNU Screen list all users - attached/detached?


how can I list all users processes in screen such that I can see if process is attached/detached?

Problem with -ls is that, it doesn't list all users. When I do ls /var/run/screen/S-userName. I can see processes, but I can't see if they attached/detached. Also I need to do it for all users.


Solution

  • I have figured out it and for anybody who need it:

    There is command in Linux:

    su - userName -c 'screen -ls'
    

    It will display all attached/detached screens for any user. But you need to be root as well.

    Actually it is not full solution. But it works well. You'll need to run(as root) it for all users you want.