I have a script running thru crontab that calls a QT popup (named shutdown_warning). The popup does not display on the screen and the error received is: shutdown_warning: cannot connect to X server The script calls "shutdown_warning" from roots home directory. The crontab is being executed from root. It displays fine on the user console if, as root, I execute the script and export $DISPLAY:1.0 I need this popup to display on the user console and all remote console connections. Any help would be appreciated. Thanks -----
SuseUser9X wrote regarding '[SLE] crontab script has X server problem' on Thu, Sep 23 at 07:18:
I have a script running thru crontab that calls a QT popup (named shutdown_warning). The popup does not display on the screen and the error received is:
shutdown_warning: cannot connect to X server
The script calls "shutdown_warning" from roots home directory. The crontab is being executed from root.
It displays fine on the user console if, as root, I execute the script and export $DISPLAY:1.0
I need this popup to display on the user console and all remote console connections.
Any help would be appreciated.
Is it enough to just put DISPLAY=1:0 at the beginning of the crontab file that describes the job? If that environment variable is all that's missing, that's all you have to do. --Danny
* Danny Sauer
Is it enough to just put DISPLAY=1:0 at the beginning of the crontab file that describes the job? If that environment variable is all that's missing, that's all you have to do.
Wouldn't the 'display' need to be owned or started by root or need to have root added as a permitted accessor, just a the present X:0 needs? -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
Patrick wrote regarding 'Re: [SLE] crontab script has X server problem' on Thu, Sep 23 at 14:45:
* Danny Sauer
[09-23-04 13:48]: Is it enough to just put DISPLAY=1:0 at the beginning of the crontab file that describes the job? If that environment variable is all that's missing, that's all you have to do.
Wouldn't the 'display' need to be owned or started by root or need to have root added as a permitted accessor, just a the present X:0 needs?
Under the assumption that it works fine when run as root by just adding the variable, then just adding a variable to the crontab would fix it. You're right, though, which is why the response was worded as a question. :) --Danny
participants (3)
-
Danny Sauer
-
Patrick Shanahan
-
SuseUser9X@aol.com