number of users: a solution

Peter Garrett peter.garrett at optusnet.com.au
Wed Aug 24 18:59:28 UTC 2005


On Wed, 24 Aug 2005 16:46:44 +0200
Sebastien Braun <sebb at yellowhippy.org> wrote:

> Am Mittwoch, 24. August 2005 07:53 schrieb Peter Garrett:
> > Sebastien Braun <sebb at yellowhippy.org> wrote:
> > >
> > > For a program to be able to record its entries in utmp, root privileges
> > > are needed. kdm obviously has them, so does /sbin/login, which is
> > > responsible for the terminal logins. Konsole, however, does not. It
> > > relies on a daemon called utempter to do the utmp updating for it. I was
> > > not able to find utempter in apt, so chances are that ubuntu does not
> > > support konsole showing up in who.
> >
> > OK - I had a look at two terminals that show the differing behaviour we
> > have been discussing...
> >
> > peter at prospero:~$ ls -l /usr/bin/aterm
> > lrwxrwxrwx  1 root root 23 2005-05-05 09:07 /usr/bin/aterm ->
> > /etc/alternatives/aterm
> >
> > peter at prospero:~$ ls -l /usr/bin/aterm-xterm
> > -rwxr-sr-x  1 root utmp 101592 2004-08-14 05:40 /usr/bin/aterm-xterm
> >          ^                ^^^^
> >
> > peter at prospero:~$ ls -l /usr/bin/urxvt
> > -rwxr-xr-x  1 root root 180776 2005-03-21 21:51 /usr/bin/urxvt
> >         ^               ^^^
> >
> > AHA!!  A light bulb goes on in my brain... so I do
> >
> > peter at prospero:~$ sudo chown root:utmp /usr/bin/urxvt
> > peter at prospero:~$ ls -l /usr/bin/urxvt
> > -rwxr-xr-x  1 root utmp 180776 2005-03-21 21:51 /usr/bin/urxvt
> >
> > and
> >
> > peter at prospero:~$ sudo chmod g+s /usr/bin/urxvt
> > peter at prospero:~$ ls -l /usr/bin/urxvt
> > -rwxr-sr-x  1 root utmp 180776 2005-03-21 21:51 /usr/bin/urxvt
> >
> > Now urxvt shows up and increments in the same manner as aterm.... !!
> >
> > I haven't tried this with konsole but I imagine something similar would do
> > the trick
> 
> I don't think so. Konsole will not write utmp directly. This, according to KDE 
> bug #17296 (http://bugs.kde.org/show_bug.cgi?id=17296) is A Feature Not A 
> Bug(tm). It avoids a freak konsole b0rking utmp and messing up system state. 
> Konsole, as I said above, relies on a little helper daemon to update utmp. If 
> utempter is not installed, konsole sessions will not show up in utmp, except 
> if Ubuntu has patched konsole.
> 
> Cheers,
> Sebastien

Thanks for the clarification, Sebastien!

Ah well, yet another reason for me to stick with my preferred, fast-starting, lightweight terminal emulators....

Shall we start a terminal-emulator Holy War ? *grin*

(just kidding)  ;-)


Peter 


-- 
Linux User #343161




More information about the ubuntu-users mailing list