Running Ubuntu 12.04. I have many users logged in via SSH and opening an Openbox session. How do I loop through all the logged in users and their display number so that I can execute a command for specific users?
The command would be the extension of restarting a Java application that they have open.
I have tried who -a, but it doesn't seem to list any SSH users and their display number. I am able to get display numbers via cd /tmp/.X11-unix but not their corresponding user login.