I seem to have gone brain dead, maybe normal... I cannot start an X app from cron. All my efforts have presented: cannot connect to X server ie: /opt/kde3/bin/kstart --desktop 4 /usr/bin/smtm. results in an email: kstart: cannot connect to X server not a problem with smtm, a perl/Tk app. ie: /usr/bin/smtm works -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
I seem to have gone brain dead, maybe normal... I cannot start an X app from cron. All my efforts have presented: cannot connect to X server
ie: /opt/kde3/bin/kstart --desktop 4 /usr/bin/smtm. results in an email: kstart: cannot connect to X server
not a problem with smtm, a perl/Tk app. ie: /usr/bin/smtm works
-- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 are you running the cron task as your login user? i.e. is xhosts disallowing
On Wednesday 23 November 2005 21:29, Patrick Shanahan wrote: the access? Phil
* Phil Burness <pburness@btopenworld.com> [11-23-05 16:47]:
are you running the cron task as your login user? i.e. is xhosts disallowing the access?
Yes, running as {user}, the logged in user. It does not say that xhosts is not allowing, only that it cannot connect to X. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
Patrick Shanahan wrote:
I seem to have gone brain dead, maybe normal... I cannot start an X app from cron. All my efforts have presented: cannot connect to X server
ie: /opt/kde3/bin/kstart --desktop 4 /usr/bin/smtm. results in an email: kstart: cannot connect to X server
not a problem with smtm, a perl/Tk app. ie: /usr/bin/smtm works
Be noted that a crontab entry does not get an environment as you get on login. It is verry likely the $DISPLAY is not set. Then there is also the X11 security like xauth and xhost and such. Try to create an `at` entry from your crontab entry. With `at`, you will get the environment roughly as it is where you create it. You can fetch this at-job to a save place and with a proper name. Create a crontab entry from that script. CBee
* cbeerse@gmail.com <cbeerse@gmail.com> [11-24-05 08:49]:
Try to create an `at` entry from your crontab entry. With `at`, you will get the environment roughly as it is where you create it. You can fetch this at-job to a save place and with a proper name. Create a crontab entry from that script.
I get the same result, cannot connect to x server, with 'at' in the crontab file or in the called script. BUT, adding 'export DISPLAY=:0 to the calling script did the trick. thankyou for your lead. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
participants (3)
-
cbeerse@gmail.com
-
Patrick Shanahan
-
Phil Burness