Re: How to detect which user is connected to $DISPLAY
Michelle Konzack wrote:
> Hello Martin,
s/Martin/Joey/g
> > 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...
Ah, finally, discrepancy located. :)
Regards,
Joey
--
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect.
Please always Cc to me when replying to me on the lists.
Reply to: