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?
1 Answer
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