[Lcdproc] Lcdexec: SHELL environment variable not set
Michelle Dupuis
support@ocg.ca
Tue Feb 6 16:16:01 2007
I'm starting to answer my own question here....but I see that the "service"
script in FC6 launches another script as follows:
env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}"
start
The "-i" forces an empty environment. That's why it's failing. This means
that lcdexec can never be started as a service. That seems like a bad
design....
Peter - any changes planned for lcdexec that might affect this? Seems like
a simple fix...
Thanks,
MD
-----Original Message-----
From: lcdproc-admin@lists.omnipotent.net
[mailto:lcdproc-admin@lists.omnipotent.net] On Behalf Of Michelle Dupuis
Sent: Tuesday, February 06, 2007 11:09 AM
To: lcdproc@lists.omnipotent.net
Subject: [Lcdproc] Lcdexec: SHELL environment variable not set
Hopefully someone can help here...
I confirmed that LCDexec is running as root:
root 19160 0.0 0.0 7912 292 ? Ss Feb05 0:00 lcdexec -c
/etc/lcdexec.conf
But for some reason when lcdexec is start from another bash script (in this
case via "service lcdd start"), its environment does not include the SHELL
variable. That's what's causing the "SHELL environment variable not set"
error.
Ideas anyone? How do I ensure lcdexec can see the SHELL variable? (I don't
think setting SHELL in the lcdd service script will help since it is already
set).
Should I patch lcdexec.c (line 319) to set argv[0] to /bin/bash ? That
seems wrong...
Thanks,
MD
-----Original Message-----
From: lcdproc-admin@lists.omnipotent.net
[mailto:lcdproc-admin@lists.omnipotent.net] On Behalf Of Michelle Dupuis
Sent: Monday, February 05, 2007 2:59 PM
To: lcdproc@lists.omnipotent.net
Subject: [Lcdproc] SHELL environment variable not set
I have my lcdexec menu buttons somewhat working, but have a strange problem.
When I launch lcdexec from the command line, my echo commands show text on
screen (as expected) when buttons are pressed. However, when I launch
lcdexec from a script file on start (a service script in /etc/init.d in
FC6), I get an error when buttons are pressed:
"SHELL environment variable not set"
Obviously the lcdexec program doesn't know what shell to launch the command
with. So...why does it know when launched from the command line, but not
from another script? (I don't see a SHELL variable set in my environment at
any time)
Thanks,
MD
_______________________________________________
LCDproc mailing list
LCDproc@lists.omnipotent.net
http://lists.omnipotent.net/mailman/listinfo/lcdproc
_______________________________________________
LCDproc mailing list
LCDproc@lists.omnipotent.net
http://lists.omnipotent.net/mailman/listinfo/lcdproc