number of users: what's the key?

Peter Garrett peter.garrett at optusnet.com.au
Tue Aug 23 08:24:58 UTC 2005


On Mon, 22 Aug 2005 11:40:27 -0700
Vram <lamsokvr at xprt.net> wrote:

> > urxvt also doesn't increment the number of users here, even when invoked with -ls for a new login shell.
> > Aterm, xterm, gnome-terminal all increment. 
> > 
> > I'd like to know what causes this behaviour, since I like to know how many terminals I have open... :)
> > 
> > Maybe someone can enlighten us?
> 
> 
> I hate to do this....
> 
> I know it is not a good answer.
> 
> 
> But, I don't quite understand your question..

Not exactly a question, vram.... more an addition to other people's comments - a rhetorical question perhaps.  But here goes anyway..

peter at prospero:~$ who
peter    tty2         Aug 20 02:02
peter    :0           Aug 21 16:34
peter at prospero:~$ pgrep rxvt
24572
27929
peter at prospero:~$ users
peter peter


So, user peter is logged on twice according to "who": once on display :0 (which is the gdm login)
and once on tty2. 

But there are two instances of rxvt running on my :0 display, as " pgrep rxvt " shows above. Note that these instances of rxvt are invoked with -ls, which is the "login shell" option. So I have, apparently, 4 shells running... Or maybe not? 

Now watch: I exit the 2 rxvt terminals, and substitute 2 aterms instead: same number of tty logons, same number of terminal emulators running in X....

peter at prospero:~$ who
peter    tty2         Aug 20 02:02
peter    :0           Aug 21 16:34
peter    pts/2        Aug 23 17:51 (:0.0)
peter    pts/4        Aug 23 17:52 (:0.0)


So using aterm, "who" (correctly it would seem) shows that 4 shells are currently running. 
peter at prospero:~$ users
peter peter peter peter

> 
> So maybe this will help

> 
> man who
> 
> man users

> 
> 
> So state the question in definitive terms.

I think you meant "definite" - but we'll let the pedantry pass ;-) 

I'm just curious as to why using different terminal emulators gives different results.
Others commented that using konsole seems to result in similar behaviour to that shown above with rxvt.
> 
> Not like: "How many stars are there?"
> 
> 
> But like: "Standing on Bill Gates back porch looking South ... How many
> stars are there?"

Heh - it's not really a cosmically important issue, is it ? I won't lose sleep if the mystery remains unsolved. Colourful analogy though...
> 
> 
> Thanks
> 
> Vram


-- 
Linux User #343161




More information about the ubuntu-users mailing list