[mythtv-users] /usr/bin/mythfilldatabase - cannot connect to Xserver

Joe Ripley vitaminjoe at gmail.com
Sun Sep 23 16:36:05 UTC 2007


On 9/23/07, Stephen Kitchener <stephen at g6dzj.demon.co.uk> wrote:
> Hi,
> I have a strange error, whenever I get cron to run /usr/bin/mythfilldatabase
> like this
>
> (Sorry for the line-wrapping, its supposed to be 2 lines....)
>
> 35 10 * * * mythtv /usr/bin/mythfilldatabase
> > /var/log/mythtv/mythfilldatabase.log 2>&1
> 45 16 * * * mythtv /usr/bin/mythfilldatabase
> > /var/log/mythtv/mythfilldatabase.log 2>&1
>
> As the mythtv user, ie it's in mythtv's crontab I get written
>
> "mythtv: cannot connect to X server" to the log file.
>
> Now - when I run the same command "/usr/bin/mythfilldatabase" from mythtv's
> command line when I am logged in as mythtv, the command works.
>
> Can someone please let me know what's going on......

If this is being run from mythtv's crontab, you don't need to specify
the username in the line.  What's happening is, the program
/usr{/local}/bin/mythtv is being run... and that's why you get that X
error.

Your crontab line should look like this:

35 10 * * * /usr/bin/mythfilldatabase /var/log/mythtv/mythfilldatabase.log 2>&1

Assuming this file is NOT /etc/crontab

-- 
Joe Ripley
vitaminjoe at gmail.com


More information about the mythtv-users mailing list