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

How to detect which user is connected to $DISPLAY

Hello *,

curently I am coding a tool which run from cron (as root) periodicly
and if a $USER is loged into X it shows Messages.

My Problem is, HOW to find the $USER who is connected to a $DISPLAY.

If I start two xserver I have e.g. :0 and :1.

I was serching for a command which tell me which user was opening the
xsession but without luck.  'who' does not work for this.

Thanks in advance

Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature

Reply to: