I'm having a little problem. I need to (from the command line) be able to see what users are logged in.
Here's the tricky part: I DO NOT want those users that have locked their screens and left their desktop to show up in my list.
I've tried doing these two things, but both of them show users that have locked desktops. Is there anything else I can do?
w
last | head -n 1

slock, or such. – grawity Mar 11 '12 at 17:30