[mythtv-users] mythfilldatabase autorun config file location error

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 18 01:57:01 UTC 2006


On 10/17/06 20:42, Neil Sedger wrote:

>So as I see it the potential solutions are:
>
>a) Fix the 'missing audio/video groups' thing - is that possible to do as part of a mythbackend rpm update? - and put the initscript back to running mythbackend as 'mythtv'
>  
>
Don't know.

>b) Add an option to myth 'run mythfillbackend as user:' 
>  
>
That would require that either mythbackend is being run as a) root (who 
has permissions to su/sudo/ksu to any user) or b) a user who has 
permission to su/sudo/ksu to another user.  Having a non-functional 
setting available for those who aren't running as root/are running 
without permission to switch user would cause more harm than good (and 
require a lot of mostly useless logic in the housekeeper to figure out 
how to run mythfilldatabase).

And, for this to even do any good, mythbackend would have to start a 
login shell (i.e. "bash -l") in which to execute mythfilldatabase to 
ensure that the HOME environment variable is set.

>c) Enhance the RH initscript to setup root's (or mythtv's, even though it is running as root?) environment before launching mythbackend. 
>
>
>Any of these changes would have to be accompanied with some sort of release note explaining why the change is necessary and that the user may have to move the /.mythtv dir to /root/.mythtv (or ~mythtv/.mythtv).
>

IM(non-FC-using)HO, c is the best option, but because of users' uncanny 
ability to not read release notes/README's/post-install 
warnings/whatever before running the upgraded version, putting in a 
commented line:

#export HOME=/home/mythtv

and telling the user to uncomment it as desired may be the best bet.  
Or, users who want to configure things better can just add the line 
"export HOME=/home/mythtv" to their mythbackend init script whether or 
not their distro's installer configures the init script for them.

It really doesn't matter where the config files are as long as they're 
where the system tells Myth they are.  (Although /.qt and /.mythtv are 
ugly and not FHS-compliant. ;)  And, running mythfilldatabase as root is 
very much a lesser evil than running mythbackend as root (because of the 
difference in size/runtime of the apps), so if you're running 
mythbackend as root, it doesn't hurt (much more) to also run 
mythfilldatabase as root.

The only real issue here is the fact that users often configure 
mythfilldatabase as the mythtv user and then it fails when run by 
mythbackend (which is running as root or in an environment without a 
HOME).  As long as the user puts config files in the right place, Myth 
is happy.  So, user education--which is what this list is all about--is 
the best fix.  :)

Mike


More information about the mythtv-users mailing list