number of users: a solution

Sebastien Braun sebb at yellowhippy.org
Wed Aug 24 14:46:44 UTC 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050824/c1170bec/attachment.sig>


More information about the ubuntu-users mailing list