Hello everybody.
First, I'll generalize my problem. I have a file in /etc/profile.d/ directory that exports variable DISPLAY, and a services that demands variable DISPLAY in order to get started. Though DISPLAY variable is present, service script cannot access it during execution. Why?
I'm using CentOS 6.3
------------------------------------------------------------------------------------------------------------------------
To elaborate the problem: I'm trying to run Sahi and Selenium as daemons that outputs to Xvfb, and though I exported DISPLAY during startup, both Selenium and Sahi cannot see it when starting. On the other hand ,everything works fine if I put DISPLAY variable within service(Sahi or Selenium) starting script.
Finally, code look like this:
/etc/profile.d/xvfb.sh
echo $DISPLAY returns :99
Relevant part of service starting script when service doesn't work: /etc/init.d/sahid.sh
Code:
./start_dashboard.sh
Relevant part of service starting script when service DOES work: /etc/init.d/sahid.sh
Code:
DISPLAY=":99" ./start_dashboard.sh
All that means that it can't access variable DISPLAY
Again - why?
Hope I didn't miss the forum for the problem I have.