Mailinglist Archive: opensuse (4570 mails)

< Previous Next >
Re: [SLE] start X app from cron
  • From: "cbeerse@xxxxxxxxx" <cbeerse@xxxxxxxxx>
  • Date: Thu, 24 Nov 2005 09:11:17 +0000 (UTC)
  • Message-id: <438583B1.4010908@xxxxxxxxx>
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


< Previous Next >
Follow Ups
References