[mythtv-users] Schedules Direct

James Abernathy jfabernathy at gmail.com
Sat Jan 27 16:04:25 UTC 2018


> On Jan 27, 2018, at 10:27 AM, Jerry <mythtv at hambone.e4ward.com> wrote:
> 
> On Sat, Jan 27, 2018 at 6:28 AM, Jim Abernathy <jfabernathy at gmail.com <mailto:jfabernathy at gmail.com>> wrote:
> 
>> One more thing.  When you set up the initial database, the script should be running as the user which runs mythbackend, which is mythtv in my case.  The files get put in the currrent user's home directory so this is important.
>> 
>> If you do this as a different user, you can try to copy the relevant folder (~/.xmltv) to your mythbackend user's home directory, but it's easy to make a mistake there.  You can try it though.  'sudo cp -R ~/.xmltv /<mythtv_home_dir>/'.  Be sure to 'chown -R mythtv:mythtv .xmltv' (or whatever user it happens to be in Ubuntu)  If in doubt where that home directory is, you can check the user's entry in /etc/passwd.
>> 
>> This is the sort of thing that I like to try but it's really safer to do it the right way and just log in as the mythtv user.   It will probably save you time in the long run.  I happen to have a password for the mythtv user.  I finally just set a password for the mythtv user because I have to log in as that user a lot.  'sudo passwd mythtv' will do that for you.  And you may have to add a shell for him in /etc/passwd.  Then you can just 'su - mythtv' and login.  Again, I don't know the way that Ubuntu is set up.
>> 
>> Sorry if this is too simplistic.
>> 
>> Running 'su - mythtv -c '/usr/bin/tv_grab_zz_sdjson_sqlite' may do the trick if you don't have a password for mythtv.
>> 
> 
> I checked the morning and at 2AM mythfilldatabase ran automatically and FAILED.  At least that is what is displayed with on a FE. I used System Information and check the Schedule Status.  It FAILED with error code 1, but I can't find a log file that gives me any detail.
> 
> If it's a permission problem I can chown mythtv:mythtv for the XMLTV related config and database files, but not sure how to figure this one out.
> 
> Jim A
> 
> I think you're nearly there.  You can run the script successfully.
> 
> On my Fedora system, the automatic mythfilldatabase job runs as the mythtv (mythbackend) user.  So I'm pretty sure those files need to be in the mythtv user's home directory.  You'll have to check /etc/passwd for the path there, but on my system it's /etc/mythtv.  Just make sure they are in the right place.
> 
> As to your other thread, I also had problems until i started running mythtv-setup as the mythtv user.  I just manually changed the shell for the mythtv user in /etc/passwd to /bin/bash from /bin/false or whatever it was.  That alone did the trick.  Then I added a password for mythtv with 'sudo passwd mythtv' and I was ready to roll.
> 
> I do the regular day to day maintenance as my regular user (not mythtv).  I just do the mythtv maintenance as user mythtv.  I don't log in as mythtv very often, and when I do, I type 'su mythtv' when I'm logged in as my regular user to switch accounts.
> 
> I'm not sure as to the security issues involved here with giving the mythtv user a shell.  Maybe someone else will chime in.  For a few years, I actually just did everything on my mythtv backend as the mythtv user and I never had a problem.  My backend is behind my router and it's inaccessible from outside my LAN.  If there is a glaring problem with this and someone has a better alternative, I'm all ears.  I'm pretty sure it's okay.  Just use a good password.
> 
> So, if you want, you can try just manually copying over the files from /home/jim/.xmltv or wherever they are to /<mythtv_home>/.xmltv and change the ownership of them.  Or you can go through the entire process again.
> 
> I tried to be clear (and I know I failed) but it was hard to remember exactly how I set it up over a year ago.  I think you're almost done and you'll have it working very soon.
> 
> Jerry

Thanks for the help.

I missed something by just copying over the files, so I deleted my Video Source stuff in mythtv-setup and started over, this time running it as user mythtv. That got everything created correctly again. I can run mythfilldatabase as user mythtv and it runs without error, but I get that message in System Information-> Schedule status that the fill ran but there was nothing to add.  I get that if I run mythfildatabase manually when it’s already run automatically. 

So I think I have it now, but will not know for sure until it runs over night and fills the database again.

Jim A

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
> http://lists.mythtv.org/mailman/listinfo/mythtv-users <http://lists.mythtv.org/mailman/listinfo/mythtv-users>
> http://wiki.mythtv.org/Mailing_List_etiquette <http://wiki.mythtv.org/Mailing_List_etiquette>
> MythTV Forums: https://forum.mythtv.org <https://forum.mythtv.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180127/7a4223f3/attachment.html>


More information about the mythtv-users mailing list