Advertisement

03.07.2008 at 04:12PM PST, ID: 23224468
[x]
Attachment Details

Allow root to create a popup on screen

Asked by Adam314 in Linux, Linux Programming, Linux Network Security

Tags: , , ,

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
 
 
[+][-]03.08.2008 at 06:30AM PST, ID: 21077057

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Linux Programming, Linux Network Security
Tags: linux, display, ubuntu, xhost
Sign Up Now!
Solution Provided By: ravenpl
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.08.2008 at 04:08PM PST, ID: 21079302

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2008 at 08:24PM PST, ID: 21080130

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.08.2008 at 08:28PM PST, ID: 21080203

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.09.2008 at 03:40AM PDT, ID: 21080871

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.09.2008 at 04:44AM PDT, ID: 21080989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.09.2008 at 04:54AM PDT, ID: 21081015

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.09.2008 at 10:31PM PDT, ID: 21084348

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.10.2008 at 01:04AM PDT, ID: 21084687

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.10.2008 at 07:19AM PDT, ID: 21086544

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.11.2008 at 01:37AM PDT, ID: 21093900

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.11.2008 at 08:47AM PDT, ID: 21096864

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906