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

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



Hello Martin,

Am 2005-04-04 19:31:45, schrieb Martin Schulze:

> FWIW: That's not always the case.  Below is a real-world example
> from a woody system with XDM:
> 
> koulutie!joey(pts/4):~> w
>  19:28:13 up 29 days,  8:52,  6 users,  load average: 0.02, 0.04, 0.06
> USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
> joey     tty2     -                09Mar05  9days  1:15   1:14   ssh finlandia
> joey     :0       -                06Mar05 ?xdm?   0.00s   ?     -
> joey     pts/0    :0.0             06Mar05 29days  0.26s  0.26s  bash
> joey     pts/2    :0:S.0           06Mar05  3days  6:13   6:13   ssh finlandia
> joey     pts/3    :0:S.1           06Mar05 29days 32:05m 32:05m  ssh finlandia
> joey     pts/4    finlandia.home.i 07Mar05  1.00s  5.44s  0.18s  w
> koulutie!joey(pts/4):~> w | awk '{print $1" "$2}' | grep ":0$" | awk '{print $1}'
> joey
> koulutie!joey(pts/4):~>
> 
> So Sean's script works fine as it should be.
> 
> It doesn't, if X is started via startx, though.

Argh !!!  -  My test system IS startet from the console and startx.

So, this was the error...

> Regards,
> 
> 	Joey

Thanks Joey
Michelle

-- 
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: