[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to detect which user is connected to $DISPLAY

On Sun, Mar 27, 2005 at 10:14:03PM +0200, Vincent Zweije wrote:
> As I understand it, the program that puts these entries into the whois
> database is called sessreg.  Have a look at it; it should be part of
> the X startup/shutdown script, at least for xdm.

or, if you want to take it a level of abstraction deeper, these programs
are all using the utmpx library calls to register the "logins".  w,
who, last, and finger all use utmpx system calls to tell you about who's
currently (or previously) logged in.  

a while back i wrote a neat little program to query the utmpx databases,
called "wuzzah".  while the program itself may or may not be helpful for
this specific need, the source code would be helpful if you go this
direction (and are using a c program).



Attachment: signature.asc
Description: Digital signature

Reply to: