[ale] Launch GUI from Cron
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sun Sep 9 22:09:56 EDT 2007
On Sun 2007-09-09 02:51:15 -0400, Brian Pitts wrote:
> I created the following script
>
> #!/bin/sh
> export DISPLAY=:0
> zenity --question --text="What are you doing?"
>
> and added an entry for it in my crontab. Although syslog shows that it
> runs, I never see the dialog. Any suggestions on making this work?
hrm. seems to work for me (though i don't know zenity). When I set
my crontab to this:
# m h dom mon dow command
* * * * * bash -c 'DISPLAY=:0 xmessage foo'
every minute i get a little annoying "foo" popup dialog box.
I'm running debian lenny/sid, and my X session is managed by
openbox-session.
Is it possible that your machine is configured to use randomized
$XAUTHORITY locations for each X session or something? If that was
the case, processes running under the crontab wouldn't be able to
authenticate to your X session.
Is there a way you can ask zenity to provide more explicit debugging
spew? can you have the script dump error messages to a logfile?
exec 1>~/nag.log && exec 2>&1
Is there anything in your ~/.xsession-errors (or equivalent file)?
have you double-checked that yer actually using DISPLAY :0?
--dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 826 bytes
Desc: not available
More information about the Ale
mailing list