setting an environment variable - it doesn't seem to work
by mstrimel from LinuxQuestions.org on (#5H0QB)
I'm trying to configure the lirc remote control software, but I'm hoping someone can help me even if they are not familiar with lirc.
My lirc commands are failing because they are pointing to an interface called /usr/local/var/run/lirc/lircd, when in fact the program is listening on /var/run/lirc/lircd (without the /usr/local prefix)
The manpage has this entry:
ENVIRONMENT
LIRC_SOCKET_PATH
The lircd socket to connect to, defaults to a hardcoded default value /usr/local/var/run/lirc/lircd
So the hard coded value is obviously my problem. The manpage made me think I could change an environment variable called LIRC_SOCKET_PATH to point in the correct place, and I would be good to go.
So I edited /etc/environment to add a line "LIRC_SOCKET_PATH=/var/run/lirc/lircd".
I logged out and back in, and I get:
mary@mythbox:~$ printenv | grep lir
LIRC_SOCKET_PATH=/var/run/lirc/lircd
so it looks like it worked. But then when I run the lirc program (irsend, if it matters), it still fails because it is trying to point to the hard-coded interface of /usr/local/var/run/lirc/lircd
Is there something about the manpage that I am misunderstanding? If something is hard-coded, am I SOL and if so, what is the point of having an environment variable for it?
Thank you in advance!


My lirc commands are failing because they are pointing to an interface called /usr/local/var/run/lirc/lircd, when in fact the program is listening on /var/run/lirc/lircd (without the /usr/local prefix)
The manpage has this entry:
ENVIRONMENT
LIRC_SOCKET_PATH
The lircd socket to connect to, defaults to a hardcoded default value /usr/local/var/run/lirc/lircd
So the hard coded value is obviously my problem. The manpage made me think I could change an environment variable called LIRC_SOCKET_PATH to point in the correct place, and I would be good to go.
So I edited /etc/environment to add a line "LIRC_SOCKET_PATH=/var/run/lirc/lircd".
I logged out and back in, and I get:
mary@mythbox:~$ printenv | grep lir
LIRC_SOCKET_PATH=/var/run/lirc/lircd
so it looks like it worked. But then when I run the lirc program (irsend, if it matters), it still fails because it is trying to point to the hard-coded interface of /usr/local/var/run/lirc/lircd
Is there something about the manpage that I am misunderstanding? If something is hard-coded, am I SOL and if so, what is the point of having an environment variable for it?
Thank you in advance!