Consolekit is exactly for this purpose; tracking users, logins, and
seats.  You can read a little bit more about it at
http://www.freedesktop.org/wiki/Software/ConsoleKit

It reports all of this through modern mechanisms; dbus.  Basically any
interactive (local or remote) session will invoke a console kit session.
This is why you'll see things like SSH listed in it as well as X.

ck-list-sessions is actually a wrapper tool around it's dbus interface.  It 
will show you lots more information than you probably care about, but it can 
certainly tell you whether a user is logged in or not.  That tool itself might 
not be well documented, but that's because it's output is pretty self 
explanatory.  You can read it's code here to understand more if you're a bit 
confused still:
http://cgit.freedesktop.org/ConsoleKit/tree/tools/list-sessions.c

I think the best thing for you to do though is read the documentation.
The DBUS api is documented there and you can take advantage of it.
http://www.freedesktop.org/software/ConsoleKit/doc/ConsoleKit.html

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/875817

Title:
  who -q no longer counts gui users

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/875817/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to