View Single Post
grog's Avatar
Posts: 546 | Thanked: 85 times | Joined on Feb 2008 @ Winnipeg, Canada
#31
Originally Posted by allnameswereout View Post
Originally Posted by grog View Post
Unfortunately it does need to be run as 'user'. If run as root I get the error 'cannot connect to x display'.
Try
Code:
DISPLAY=:0.0 rndback
I hadn't thought that it might be just that the DISPLAY hadn't been set. Unfortunately it still won't work via the cron implementation I'm using. I've tried all of the following forms & none of them work.

Code:
*/10 * * * * DISPLAY=:0.0 rndback
Code:
*/10 * * * * (DISPLAY=:0.0; rndback)
Code:
DISPLAY=:0.0
*/10 * * * * rndback
After working with various cron's over the years I've come to expect this kind of thing. About the only method I haven't tried is to put the lines into a script & running the script instead, but to tell you the truth, su works just fine & I have any issues doing it that way. But thanks for the help anyway.
__________________
GROG!
N900 | ZAGG Body Armour | 16Gb A-DATA micro-sd
N810 | 2 x Patriot 8gb mini-SD | Boxwave Crystal Clear SS | Black Aluminum case | OTG dongle
N800 | 2 x 8gb OCX SD | Boxwave Anti-glare SS | PDAir book-style case
Holux M-1200 bluetooth GPS | iGo 4-row bluetooth keyboard | Linksys USB 10/100 ethernet | Plantronics Voyager 855 BT Headset