pon oddities - pop-up windows from ip-up.local, pppstatus
I've decided to automate what I've been doing manually after starting
pppd, via pon.
/usr/bin/pon (a script) starts /usr/sbin/pppd (an suid root executable).
I used to start pon as root, but I've added myself to the dip group
so I now can start it as a regular user. After the link is up,
/etc/ppp/ip-up.local is executed. This works to get the mail and
But I would like a window to pop up telling me when that is done, so
I researched a bit and found zenity. I also wanted to pop up a
konsole with pppstatus running in it.
When running a test script as myself that runs the zenity line:
zenity --info --text="Done getting the news"
it works fine, the window pops up. But when called from ip-up.local
nothing happens. The only error in the log file is:
This option is not available. Please see --help for all possible usages.
I've also tried:
su <regular-user> -c 'zenity --info --text="Done getting the news"'
with the same result. I understand that pppd is suid root and that is
the likely cause of the problem. I've added DISPLAY=:0.0 before calling
zenity with no effect.
The konsole with pppstatus running in it is called from ip-up.local
su <regular-user> -c "konsole --vt_sz 80x24 --nomenubar --notabbar --noscrollbar -e pppstatus -s 1540"
I've also tried without su. The result is the same:
konsole: cannot connect to X server
And this is even after I've typed
from a regular user console. The X/kde session was started as that user.
I understand that it is a security feature of the X server not to allow
connections from root, but how do I get a window popped up from a
setuid root script?
There is one more oddity. When ip-up.local is executed, pppstatus started
by hand (as a regular user) thinks that ppp is disconnected/off. When
ip-up.local is renamed and thus not found/executed, pppstatus has access
and works fine.
Any hints or explanations?