I have a script that is run by root from cron. If there is a failure, it creates a log. I want this to also create a popup. I am using zenity to create the popup. I am running Ubuntu 7.04 distro.
The script sets the DISPLAY:
export DISPLAY=:0.0
When the zenity command runs, it gives these errors:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
If I run xhost for a particular user, and set XAUTHORITY to that users ${HOME}/.Xauthority file, then I can get the popup. But I want the popup to be able to show up no matter what user is logged in. And if I create a new user, I don't want to have to run xhost for that user...
I want the zenity to work no matter what user is logged in. Is there a way to say root always has permission to connect to the display?
Start Free Trial