[kde-linux] kppp and cron
laurence.wallian at cemagref.fr
Wed Jan 10 14:17:52 UTC 2007
I know it's late to answer... I don't know kpp, but with kcron I've
tried (as user, no root) to launch an X command like :
/usr/bin/zenity --display :0 --info --text "Test crontab"
and it doesn't work, so I tried :
xhost +; /usr/bin/zenity --display :0 --info --text "Test crontab";
and it was OK
I also written the line xhost +; /usr/bin/zenity --display :0 --info --
text "Test crontab"; xhost - in a file zen.go and have launched it via
crontab: it was OK too.???
I've added the line DISPLAY=:0 when editing crontab (crontab -e), but
I'm not sure it's necessary
P.S. : if you don't need X, you can send a mail to yourself via crontab
Le samedi 09 décembre 2006 à 00:41 +0000, Marc Rosenthal a écrit :
> I'd like to know if it's possible to run kppp from within a user's
> (preferably root's) cron.
> I've tried setting up a script in root's cron which checks for a kppp
> session, and if one doesn't exist then start it...something like:
> */15 * * * * /root/start_kppp
> The script works fine (when run from the command line), but when it's run
> from cron and it tries to execute the "kppp -c PPP_ACCOUNT" it fails due
> to problems with the Xserver.
> Here are some of the errors I get:
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> kppp: cannot connect to X server :0
> I've even tried using "xhost +" command from within the script but nothing
> seems to work.
> Am I trying to do something impossible here?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-linux