[mythtv-users] Setting configuration key/hostname from command line

Michael T. Dean mtdean at thirdcontact.com
Sat Jan 10 16:00:00 UTC 2009


On 01/10/2009 07:56 AM, Bill Williamson wrote:
> I have a mythbox hooked up to a projector and an SDTV.  I use it for 
> one OR the other each time.  The settings for each setup are wildly 
> different.  I've separated them thus far by using a custom identifier 
> (theater-TV and theater-PROJ) to keep settings apart (lots of myth 
> settings differ to get best picture).
>
> Right now I have
> -a mysql.txt for each one in ~/.mythtv that is identical apart from 
> the custom identifier line
> -a shell script to start each "mode" (cp ~/.mythtv/mysql.txt.proj 
> ~/.mythtv/mysql.txt; mythfrontend)
>
> Is there a way to pass which identifier to use into mythfrontend?  It 
> seems like it'd be a much better way of doing so.  The man page 
> mentions overriding specific settings with a flag, but I couldn't get 
> it to work fro the master identifier (only for other specific settings).

The -O override-setting option is really meant for changing one or two 
settings on one-shot runs.  It only works for settings in the settings 
table.  The custom identifier, however, is used as the "hostname" for 
all settings pulled from the settings table.  Therefore, I don't think 
it's possible to change the custom identifier at the command line.

The closest thing would be changing the location of the configuration 
directory (using a not-highly-publicized environment variable), but that 
would mean maintaining two otherwise-identical copies of what's 
currently in ~/.mythtv.  (And, yes, while you could use links for the 
equivalent content, when doing so it's likely that over time something 
would get changed in one and not the other, and it would require careful 
creation of all the directories that Myth would normally create over 
time under the configuration directory so you'd have the proper links in 
place.)

Therefore, I'd say that the approach you're using is the best one (at 
least for now).

Mike



More information about the mythtv-users mailing list