I'm trying to use zenity and at to make a little reminder script. The problem is that while zenity --info works fine from bash (or sh), running echo "zenity --info" | at now + 1 min does nothing. The job shows up in my atq and then runs, but no zenity pop-up. What's going on?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Check your /var/log/messages, chances are you'll have some "Cannot open display" errors from your X Server.

You need to provide utilities like at and cron access to your X Display by name. Edit your ~/.bashrc to include the following:

xhost local:USERNAME > /dev/null

Substitute your username for the USERNAME value above. This will provide the at utility with the name of your X Display so it can attempt to fork zenity on it.

Modify your zenity command to include the --display switch:

echo "zenity --info --display=:0.0" | at now + 1 min 
link|improve this answer
Just doing the --display=:0.0 did it. Thanks! – Ben Kraft Aug 23 '11 at 15:57
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.