I've found a case when the notify() sub guesses the XAUTHORITY stuff wrongly and as a result no notifications appear.
Here's how the output of `who' is when I am logged in my Gnome session and there is one open gnome-terminal: dam tty7 2008-03-19 13:40 (:0) dam pts/2 2008-03-19 16:21 (:0.0) If I also run the 'gnome terminal as root' menu item, `who' guves: dam tty7 2008-03-19 13:40 (:0) root pts/1 2008-03-19 16:33 (:0.0) dam pts/2 2008-03-19 16:21 (:0.0) For some reason, the sed magic considers the 'root' session as the real one and sets XAUTHORITY to /home/root/.Xauthority. Ah, could it be the bad home directory? root's HOME is /root! Changing the code to home=`getent passwd $user | cut -d: -f6` XAUTHORITY=$home/.Xauthority guesses the home directory OK, but still can't display the notification, as the root session is using another file -- /tmp/libgksu-$random/.Xauthority Doh! Still, I think that the change to notify() that guesses user's home directory from getent is useful. Also, how do you feel about sending notifications to *all* available X sessions? My sed-foo is not high enough for this, but I can create some grep/cut or awk thing... -- dam JabberID: [EMAIL PROTECTED]
signature.asc
Description: Digital signature