<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I want to thank Mr. Shaw for enlightening me on how and why the
Fedora MythTV system is configured the way it is and why it
doesn't quit fit with the general community's assumptions. Here
is how I got migrated to xmltv on MythTV 0.31 running on Fedora 31
(seems fitting).</p>
<p>Fedora's MythTV package creates a mythtv user and its own mythtv
group with home in /var/lib/mythtv and no login shell or
password. I added my normal user to the mythtv group and moved my
~/.mythtv directory and contents to /var/lib/mythtv, then
symlinked from ~/.mythtv to /var/lib/mythtv/.mythtv. I made sure
to chmod g+s on all directories in the mythtv home so that the
group would always have write permission. Then, when I ran
mythtv-setup as my normal user, I had write permission to mythtv's
directory structure and the xml stuff went in there where
mythfilldatabase could find it and use it. MythTV is happy and I
am happy.</p>
<p>The happiest news in all this is that the xmltvid's are still the
same. The grabbers/SD gives three choices (0-2) for channel ID
format. Option 2 keeps the numeric format and they are the same
as the old SD format. This is VERY good news.<br>
</p>
<p>I now have 500 cable channels that I need to get rid of
(something to keep my busy while sheltering in place). Any advice
on a practical way to do this would be greatly appreciated. I
have installed the xmltv-gui package that includes a program
called tv_check. Looks like perhaps a way to edit the channels.
I will take a look.</p>
<p>Are my channel selections stored in a local xml file, in the
mythconverg database or on the SchedulesDirect server? Or some
combination?<br>
</p>
<p>Thanks again for all the help,<br>
</p>
<p>Dave D.</p>
<p><br>
</p>
<p>On 4/11/20 9:31 AM, DaveD wrote:</p>
<blockquote type="cite"
cite="mid:53f33724-f742-0433-efb1-59be0e5013d7@guiplot.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><br>
</p>
<div class="moz-cite-prefix">On 4/11/20 5:29 AM, Richard Shaw
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAN3TeO0snLANWmAftwB4tYv2uW5xnGDf3MXn6_ZCETBS=_vSzg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div dir="ltr">On Fri, Apr 10, 2020 at 11:55 PM DaveD <<a
href="mailto:mythtv@guiplot.com" moz-do-not-send="true">mythtv@guiplot.com</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Fedora packages don't
create a mythtv user in the usual sense: there is <br>
no /home/mythtv directory. mythbackend runs as user
mythtv. I assume <br>
it spawns mythfilldatabase as the same user. Where is the
xmltv data <br>
going to go? Where does the channel setup data go? I'm
confused. All <br>
the pages I've read so far keep referring to mythbuntu and
creating a <br>
mythtv user. Do I need to do that so I can run xmltv
config as that <br>
user? Other stuff suggests running xmltv setup (and
mythfilldatabase?) <br>
as any user, then creating symlinks, again to
/home/mythtv/.mythtv. Do <br>
I have to have /home/mythtv/.mythtv for this to work?
Would I be advised <br>
to create an actual profile with password and literally
log in as mythv <br>
to run this stuff?<br>
</blockquote>
<div><br>
</div>
<div>You can also ask questions on the RPM Fusion mailing
list for Fedora distro specific question but I'm on both.
:)</div>
<div><br>
</div>
<div>System services often do have home directories, they're
just not in /home. For the past decade or more the Fedora
package has defaulted the mythtv user home to
/var/lib/mythtv, and in general this is the way it should
be for most services, however, because mythbackend looks
for some stuff there in $HOME even though I have
MYTHCONFDIR set to /etc/mythtv in the SystemD service
file:</div>
<div><br>
</div>
<div># systemctl cat mythbackend | grep MYTHCONFDIR<br>
Environment=MYTHCONFDIR=/etc/mythtv<br>
</div>
<div><br>
</div>
<div>Because of that I recently changed it to /etc/mythtv to
be more intuitive. HOWEVER, once the user is created,
package updates will NOT change this for obvious reasons.</div>
<div><br>
</div>
<div>To check try this as root (or sudo):</div>
<div><br>
</div>
<div># cat /etc/passwd | grep mythtv<br>
mythtv:x:900:900:mythbackend
user:/var/lib/mythtv:/sbin/nologin<br>
</div>
<div><br>
</div>
<div>Since my install is 10+ years old it's obviously on
/var/lib/mythtv so I have a mix:</div>
<div><br>
</div>
<div># ll /etc/mythtv<br>
total 50528<br>
drwxr-xr-x. 3 mythtv mythtv 4096 Apr 13 2015
3rdParty<br>
drwxr-xr-x 10 mythtv mythtv 4096 Dec 7 14:00 cache<br>
drwxr-xr-x. 2 mythtv mythtv 57344 Mar 28 20:29
channels<br>
-rw-r--r-- 1 mythtv mythtv 108 Oct 14 2018
Comcast.xmltv<br>
-rw-r--r--. 1 mythtv mythtv 627 Nov 16 2013
config.xml<br>
drwxr-xr-x 2 mythtv mythtv 4096 Feb 19 2016
HardwareProfile<br>
-rw-r--r-- 1 mythtv mythtv 5502 Nov 5 2018
mythtv.conf<br>
-rw-r--r-- 1 mythtv mythtv 108 Oct 14 2018
OTA.xmltv<br>
-rw-r--r-- 1 mythtv mythtv 51634176 Apr 10 20:40
SchedulesDirect.DB<br>
drwxr-xr-x. 2 mythtv mythtv 4096 Nov 16 2013 themes<br>
drwxr-xr-x 4 mythtv mythtv 4096 Dec 26 07:09 tmp<br>
</div>
<div><br>
</div>
<div># ll /var/lib/mythtv/.mythtv<br>
total 44<br>
drwxrwxr-x 2 mythtv mythtv 4096 Dec 9 2018 3rdParty<br>
drwxrwxr-x 2 mythtv mythtv 4096 Dec 9 2018 channels<br>
-rw-rw-r-- 1 mythtv mythtv 629 Mar 11 17:30 config.xml<br>
-rw-rw-r-- 1 mythtv mythtv 24482 Nov 4 2018
lossless_cut.cfg<br>
drwxrwxr-x 2 mythtv mythtv 4096 Dec 9 2018 themes<br>
drwxrwxr-x 3 mythtv mythtv 4096 Dec 9 2018 tmp</div>
<div><br>
</div>
<div>However, you can see my xmltv files in /etc/mythtv... I
probably need to migrate my $HOME over and see if I can
get rid of the need for /var/lib/mythtv/.mythtv. It's not
ideal to be storing non-config files in /etc, but oh well.</div>
<div><br>
</div>
</div>
</div>
</blockquote>
<p>Gawd! It's a wonder I ever recorded anything! But, until now,
it has been working really well! I don't know how, though,
because I've always run mythtv-setup as root! I don't know
where I got the idea I had to do it that way, but it always
worked; until now. My /var/mythv directory is empty; no
.mythtv, no config.xml, no tmp, nothing! That's all stored in
/root/.mythtv, which I assume is useless!</p>
<p>I don't think that $HOME should be in /etc. Like you said, etc
is for configuration. /var is where VARiable stuff (runtime
stuff) belongs; where services have their home directories.
AND, since mythbackend is a service, it shouldn't have its $HOME
in /home, either!</p>
<p>Ok, so with all that in mind, I tried 'su -l mythtv -s
/bin/bash -c mythtv-setup'. No dice. Without the GUI
environment (which /bin/bash doesn't have), mythtv-setup won't
run. I have to run it with sudo or nothing works. I could do
the xmltv stuff as mythtv, but shouldn't I be running
mythtv-setup as user mythtv? The wiki says I should be able to
setup an xmltv grabber from mythtv-setup and, in fact, it looks
like I can. The xmltv stuff, though, ends up in
/myusername/.mythtv. How can I get mythtv-setup to run as
mythtv? Is this where I'm stuck with symlinks?<br>
</p>
<p>Another question: in the xmltv configuration, it asks what
kind of ID I want to use and suggests that if I'm migrating from
the old SD format that it might be easier if I select option 2;
a numeric ID. Does that mean they will assign the same xmltvid
to the same channel? Or does it mean I still have to manually
update them all, just with numbers instead of alpha-numerics?
Can I do a command line setup and retrieve a JSON file (or
sqlite DB file) and take a look before I commit to a change?
I'm still thinking that if I have to change all the xmltvid's
that I'll write a script to do it.</p>
<p>Thanks, again, to you and all who have provided info and
advice.<br>
</p>
<p>Dave D.</p>
<p><br>
</p>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://lists.mythtv.org/mailman/listinfo/mythtv-users">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<a class="moz-txt-link-freetext" href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a class="moz-txt-link-freetext" href="https://forum.mythtv.org">https://forum.mythtv.org</a>
</pre>
</blockquote>
</body>
</html>