[mythtv-users] How to control database settings from config.xml

Michael T. Dean mtdean at thirdcontact.com
Thu Dec 22 21:44:09 UTC 2011


On 12/22/2011 04:18 PM, Göran Uddeborg wrote:
> Thanks a lot for your reply.  I have some follow-up comments if you
> have the time.
>
> Michael T. Dean:
>> On 12/21/2011 04:51 PM, Göran Uddeborg wrote:
>>> According to http://code.mythtv.org/trac/ticket/10209#comment:1 it
>>> should be possible to use config.xml mysql.txt.  I'm trying to do
>>> that, but it fails.
>> How many systems do you have (systems running mythbackend and systems
>> running mythfrontend)?  Which system is this that's not connecting?
> I have one dedicated "myth box" (host name "pluto").  It runs both the
> only backend and a frontend.  It is equipped with a DVB receiver card,
> and it displays on a traditional TV (CRT).  This machine does indeed
> work fine.
>
> Now I'm trying to connect from two other machines (host names "mimmi"
> and "freddi"); all purpose desktop machines.  These will only run the
> frontend, and connect to the backend on the "myth box".
>
> I have changed the configuration so the backend uses the external IP
> address rather than 127.0.0.1, and I've done the "grant" in MySQL to
> allow connections from the local network.  (And the dedicated box
> still works fine! :-)

That's a very important thing.  You can't use 127.0.0.1 /anywhere/ in 
the MythTV configuration when you have more than one box (and, even when 
you have only one box, you shouldn't use 127.0.0.1).  Since you said 
your dedicated box still works, I'm assuming you changed both the "this 
server" IP address and the master backend IP address to use the routable 
address.

>> If that's the case, you definitely need a:
>>
>> <SecurityPin>YOURPIN</SecurityPin>
>>
>> element in your config.xml (a child of the<DefaultBackend>  element).
>> In it, you would put the PIN value you specified in mythtv-setup for:
> I tried that, but it doesn't seem to make any difference.  Or at least
> it is not enough to fix things.  If I do that and remove mysql.txt,
> (rename it with a #-sign at the beginning) I come to the setup screen
> instead.  If I put the mysql.txt file back, I get to the normal start
> screen again.  Just as without the pin.  I attach the log output and
> the new config.xml at the end.
>
> (I kept the compatibility link in /home in both cases in this
> experiment.  To be sure I changed only this parameter.)
>
>> As far as the .config/Trolltech.conf issue goes,
> Are you quite sure this is only an upstreams issue?  I tried a couple
> of standard KDE programs (ktux, kid3) and they all looked up
> ~/.config/Trolltech.conf with the correct path.
>
>> I'm guessing there are few users (and fewer
>> developers) who have tried HOME directories with UTF-8 characters.
> I would believe so, yes.
>
>> You
>> should probably also attach both of the Trolltech.conf files that are
>> created
> Now I'm getting confused.  I can't see ANY Trolltech.conf file being
> created in the trace, let alone two.  It tries to find a
> Trolltech.conf file using a mangled path to my home directory, but it
> never creates any from what I can see.

It will only create the files if a) they don't already exist and b) it 
can create the directory.  So, since you almost definitely don't have 
permission to create new directories in /home, it's probably not trying.

> If I remove ~/.config/Trolltech.conf and then run mythfrontend, there
> still isn't any ~/.config/Trolltech.conf after I close mythfrontend.
> (If I run e.g. ktux, it is created, though.)
>
> The path to Trolltech.conf is mangled in a different way than the path
> to mysql.txt.  The mysql.txt is searched with my UTF-8 o-diaeresis
> replaced with a Latin-1 o-diaeresis.  Trolltech.conf is searched with
> a path where the o-diaeresis is simply removed.  I've been testing
> with a compatibility link for the mysql.txt variant, but none of the
> tests has been done with any link for the Trolltech.conf variant.

If you do create this variant of the name, it will likely create the 
Trolltech.conf in there.  I'm guessing when it fails to create the file 
with the mangled name, it doesn't try to create the file for the proper 
name.

To see both files, you'd need to have both directories, though.  Easiest 
way to do that is to:

export HOME=/tmp/göran
mkdir -p $HOME/.mythtv
cp /home/göran/.mythtv/config.xml $HOME/.mythtv/

Then try starting programs.  Since you have write permission to /tmp, 
the Qt code will be able to create any additional directories it needs 
for Trolltech.conf files.


>
> ================ config.xml ================
> <Configuration>
>    <UPnP>
>      <UDN>
>        <MediaRenderer>0a46441b-e51d-4236-a2ef-50266f06bb60</MediaRenderer>
>      </UDN>
>      <MythFrontend>
>        <DefaultBackend>
>          <SecurityPin>1265</SecurityPin>
>          <DBHostName>pluto</DBHostName>

Do you actually have host-name resolution set up on your internal 
network?  Does:

dig pluto

actually find the proper IP address?  If not, change that to an IP address.


> 2011-12-22 21:28:51.160 get_ip: Namn eller tjänst okänd

I'm guessing this is saying it's unable to resolve the address for 
pluto, but my Swedish is, er, not very strong.  :)  (Actually, I'm 
guessing it's "Name or service not known" based solely on the "get_ip" 
prefix to the error.)

Mike


More information about the mythtv-users mailing list