[mythtv] [mythtv-commits] Ticket #2388: fall back to ~/.lircrc if ~/.mythtv/lircrc doesn't exist

Tino Keitel tino.keitel at gmx.de
Thu Sep 14 20:45:29 UTC 2006


On Thu, Sep 14, 2006 at 14:11:51 -0400, Michael T. Dean wrote:

[...]

> Other clients that will only use ~/.lircrc /force/ you to commingle 
> settings for many different programs in a single file (although, I'm 
> sure many of those you're including in this group allow you to specify a 
> config file with a command-line option).  MythTV /allows/ you to choose 
> to keep your MythTV settings in a different location /or/ to use the 
> same config file.

You can place include statements into ~/.lircrc, so you can seperate
the settings in different files for different lirc clients.

[...]

> From man 1 lircrcd:
> 
> -o, --output=socket
>    With the --output option you can select the Unix domain socket, 
> which lircrcd will create. The default is to append a "d" character to 
> the config filename given.
> 
> So, to synchronize mode against all clients, where most use ~/.lircrc 
> (and the default socket for lircrcd), wouldn't you just make sure the 
> line in your MythTV LIRC config file (~/.mythtv/lircrc) is:
> 
> #! lircrcd -o ~/.lircrcd
> 
> (I haven't tried this, since I'm using an older version of LIRC, but it 
> sure seems that's what the designers of lircrcd envisioned.)
> 

I tried this. As soon as I append the -o option to the #! lircrcd line
in ~/.mythtv/lircrc, I get this error message:

Failed to read lirc config /home/scorpion/.mythtv/lircrc for mythtv

Now lirc control doesn't work at all in mythfrontend.

It seems that lircrcd ignores the -o option and still uses the default
path to the socket, as I saw this line in the strace output:

[pid 22841] connect(10, {sa_family=AF_FILE,
path="/home/scorpion/.mythtv/lircrcd"}, 110 <unfinished ...>

> >I tried to fix this my creating a symlink from ~/.mythtv/lircrcd to
> >~/.lircrcd to make sure that the lircrcd always uses the same socket, but
> >sometimes the symlink disappears and the socket in ~/.mythtv/ will be
> >created again. In this case I have to remove it and re-create the symlink.
> >I think this is not really a solution.
> >
> 
> If you want to have all your LIRC settings together in one file (which 
> is my assumption here), you can simply take all the settings out of 
> ~/.mythtv/lircrc and append them to the bottom of ~/.lircrc with 
> something like:
> 
> cat ~/.mythtv/lircrc >> ~/.lircrc
> 
> Then, create a symlink from ~/.mythtv/lircrc to ~/.lircrc:
> 
> ln -sf ~/.lircrc ~/.mythtv/lircrc

I already have this setup.

> 
> Now, all your settings are in the same place and there's only one LIRC 
> config file to deal with.  This won't help with the socket issue, but 
> that's what --output=socket is for...

Well, only in theory.



More information about the mythtv-dev mailing list