[mythtv-users] mythfilldatabase autorun config file location error

Axel Thimm Axel.Thimm at ATrpms.net
Wed Oct 18 06:29:09 UTC 2006


Hi,

On Tue, Oct 17, 2006 at 12:57:49PM -0400, Michael T. Dean wrote:
> The most common reason to be lacking a HOME environment variable is 
> because an init script (which is not executed under a login shell) 
> starts mythbackend and doesn't go to the trouble of setting up the 
> environment correctly.  Those without a HOME environment variable tend 
> to end up with /.qt and /.mythtv directories (off the root of the fs) 
> because the HOME expands to nothing (in MythContext::GetConfDir()).  In 
> this case--whether using XMLTV or DataDirect--mythfilldatabase will 
> download the channel icons into /.mythtv/channels directory (off the 
> root of the filesystem).

That's ugly and should be fixed. :/

> I don't know how any of the distros set things up, but if, as the OP 
> suggests, the FC init scripts don't set the HOME environment variable, 
> it means that a large number of FC users are probably relying on /.qt 
> and /.mythtv directories for their mythbackend/mythfilldatabase 
> configurations.

I think it's more probably that HOME=/root, but haven't checked. But
again /root/{.qt,.mythtv} isn't the best choice either.

> If Axel were to change the init scripts to specify a 
> HOME, then those users who had gotten configuration information into 
> directories of the root filesystem would no longer be using that 
> information (and would, therefore, have to be taught to move their 
> configuration information).  So, changing the scripts and not changing 
> the scripts both have their benefits.

The scripts should be changed. But the new packages should
auto-migrate the config values to ~mythtv/, so that the user doesn't
notice the transition other than he would miss the legacy location of
the files, should he be looking for them.

Maybe something to fix for 0.21 packages or packages from SVN, since
the migration scripts could be breaking something.
 
> But, as you were saying, running mythfilldatabase as root is not a good 
> idea.  So, by extension, figuring out how to run mythbackend as non-root 
> is a good idea.  :)

There are a couple of reasons that make mythbackend run as non-root an
issue on some or all dists. Other than the obvious permission issues
of devices root has different real time scheduling capabilities in the
kernel. There are some kernel patches to allow selected non-root users
to make use of that (most notably for jack), but there are AFAIK still
not in mainstream kernel. E.g. one needs to both replace the vendor
kernel and the vendor's permission policies.

So the hurdle to run as non-root is quite high, and in some cases the
user would not notice that some issues (like bad latency) would come
from running as non-root.
-- 
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20061018/7ab24498/attachment.pgp 


More information about the mythtv-users mailing list