Hello Jim,
thanks for the explanation.
Yes, this method seems to be the correct way: To use an external program to do
the privileged update of /var/run/utmp. The setgid bit for urxvt seems to
"drastic" just for this small job. What happens if one of the many other tasks
also
need a setgid bit, but for a different group?
On my system xterm uses libutempter
% ldd /usr/bin/xterm | grep utemp
libutempter.so.0 => /usr/lib64/libutempter.so.0 (0x00007f5d99cf8000)
but the others terminal programs don't use this but still are able to write to
/var/run/utemp by some way...
Michael
---------------------------------------
On Mon, 6 Jan 2014, Jim Diamond wrote:
Date: Mon, 6 Jan 2014 11:05:48 -0400
From: Jim Diamond <[email protected]>
To: Michael Traxler <[email protected]>
Cc: [email protected]
Subject: Re: broadcast messages
On Sun, Jan 5, 2014 at 23:37 (+0100), Michael Traxler wrote:
Hello Marc,
thanks a lot for your fast help!
On SuSE13.1 chown root.utmp /usr/bin/urxvt; chmod g+s /usr/bin/urxvt
solves the problem.
But still I'm confused:
Why does urxvt needs the setgid utmp while xterm and the others don't need this
to enable the registration in utmp?
% ls -l /usr/bin/(xterm|lxterminal|gnome-terminal|urxvt)
-rwxr-xr-x 1 root root 81888 22. Nov 13:18 /usr/bin/gnome-terminal
-rwxr-xr-x 1 root root 59552 28. Sep 12:34 /usr/bin/lxterminal
-rwxr-sr-x 1 root utmp 1307664 8. Nov 17:02 /usr/bin/urxvt
-rwxr-xr-x 1 root root 506832 2. Okt 13:53 /usr/bin/xterm
Michael,
I don't have gnome-terminal or lxterminal on my system, but xterm,
rxvt and mrxvt are all linked with libutempter, which (apparently)
uses the setgid program /usr/lib<64>/utempter to do the privileged
update of /var/run/utmp.
(As you may already know) you can check out your other terminals with
a line like
ldd /usr/bin/gnome-terminal | grep utemp
I also have /usr/bin/xfce4-terminal which is not linked to
libutempter, but it seems to use the setgid program
/usr/libexec/gnome-pty-helper to do the update.
Cheers.
Jim
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode