Mythtv 0.18.1 's init.d script sets the HOME var to /var/log/mythtv. This is where the .mythtv config settings file is stored. This should be set to /etc/mythtv/ or similar. Also, there this line in it: chown -R "${MYTH_USER}" /var/log/mythtv/ it should be chown -R "${MYTH_USER}" "${HOME}" Thanks! Reproducible: Always Steps to Reproduce:
Nope. There's a good reason for this.
This is really a non standard behavior, and one that very few users will understand. I beleive that there is a better method to solve whatever problem you are attempting to fix via this hack. We really should try to stay within the norms.
Hello, I think this now is indeed a bad solution. I had problems to start /etc/init.d/mythbackend. The init script reported ok, but ps ax showed me that there is no mythbackend running. /var/log/mythtv/mythbackend.log was empty! Instead I found .qt/ and .mythtv/ and .mythtv/mysql.txt in the directory. I played around with some settings in /etc/[init|conf].d/mythbackend. So this is what I've found: mythbackend creates a .mythtv/mysql.txt in its home directory if there is none. This default file contains the default password for mysql user mythtv (mythtv). As I changed this password (I'm running phpmyadmin) mythbackend couldn't connect to mysql (why it's not logged - I don't know). I now changed the home dir in /etc/init.d/mythbackend to the home dir of the user running mythbackend (where a correct version of mysql.txt is) and everything is now ok. So there is a need to change the home dir. Even better might be to not change the home dir for mythbackend. But the user running mythbackend must have write access to /var/log/mythtv. So chown -R "${MYTH_USER}" /var/log/mythtv/ is correct, but the home dir must be set to the home dir of ${MYTH_USER}. The file mysql.txt is a config file, also created by mythsetup. Thanks!
A solution I use is I set myth's home dir to /etc/mythtv, which mythfrontend and backend both check. This is editable in /etc/init.d/mythbackend. In any case, cardoe does have a reason for doing this, but it is a special case situation not many people will run into. We really should look into fixing the bug that causes that special situation and then we can go back to the standard behaviour. Also, to run something like mythfilldatabase, you will need to do something akin to HOME="/var/log/mythtv" mythfilldatabase and it will work fine. We should update the mythtv howto with this info if it's not already in there.
Use MythTV 0.19