[Solved] mythfilldatabase not working with user mythtv

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Maven
Newcomer
Posts: 5
Joined: Sun Jan 01, 2017 10:18 pm
United States of America

[Solved] mythfilldatabase not working with user mythtv

Post by Maven »

Fresh install of Ubuntu 22.04. I then installed a master backend via Mythbuntu Control Panel. I must have misunderstood the directions as to when to open backend setup with the user mythtv, because I ended up with my Baltimore.xmltv file in the /.mythtv folder of my own user account rather than the mythtv account. Hence, mythfilldatabase works fine when I run it as myself, but not when run as mythtv.

I gave full permissions to Baltimore.xmltv, then put a symlink to it in the /home/mythtv/.mythtv folder. I also gave full permissions to the cache file that the xmltv file references. However, I still get this error when running mythfilldatabase as mythtv: "XMLTV grabber returned error code 1, Malformed XML file, missing <\tv> element, at line 1"

Is there something more I need to do?
User avatar
heyted
Senior
Posts: 301
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: mythfilldatabase not working with user mythtv

Post by heyted »

You could try to rerun setup and adjust the applicable portions after applying the setting to run MythTV Backend Setup as mythvtv. Alternatively, you could set MythTV to not run mythfilldatabase, and set a cron job to run it nightly as the regular user if it is working using the regular user.
Ted | My blog
User avatar
AnalogBill
Junior
Posts: 29
Joined: Fri Feb 10, 2017 2:11 am
United States of America

Re: mythfilldatabase not working with user mythtv

Post by AnalogBill »

Had the same problem. Don't know which of these fixed it, but MFD now runs both automatically and under my username.
Made sure my username was in the mythtv group
chown mythtv:mythtv the "baltimore.xmltv" file and the SchedulesDirect.DB file
Copied the .xmltv files from my /home/user/.xmltv to /home/mythtv/.xmltv and verified that all were owned by mythtv.
Not elegant, but reliable unlike my remote control!
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythfilldatabase not working with user mythtv

Post by bill6502 »

viewtopic.php?f=36&t=3480&start=15#p19508 has a copy of the preferred
location of the files. The MFDB will work from the backend OK. To run from the command line, run
as user mythtv, e.g.: sudo --set-home --user=mythtv mythfilldatabase --verbose=system,xmltv
You can make an alias for that so you can run it with a simple command like runmfdb. No need
for links or duplicate copies of files.
Maven
Newcomer
Posts: 5
Joined: Sun Jan 01, 2017 10:18 pm
United States of America

Re: mythfilldatabase not working with user mythtv

Post by Maven »

Thanks, all. I found it easiest to do the suggested workaround of setting up a cron job.
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: [Solved] mythfilldatabase not working with user mythtv

Post by hedgehog52 »

As a point of reference, I was able to first su to root ("su") and then su to mythtv from root ("su mythtv"). After that, you're really mythtv and you can do all the commands manually - but you should first cd to "$HOME". And unless you've configured mythtv as a regular user, you still can't run any GUI programs.
Post Reply