Still looking for a file where I can set an environment variable
(LD_LIBRARY_PATH) available for everybody in text mode AND in photon!
Thanks,
Alain.
Still looking for a file where I can set an environment variable
(LD_LIBRARY_PATH) available for everybody in text mode AND in photon!
Thanks,
Alain.
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:
Still looking for a file where I can set an environment variable
(LD_LIBRARY_PATH) available for everybody in text mode AND in photon!
There are lots of places you can try:
/etc/profile - this is read by each login, then the users .profile is sourced.
/etc/profile.d/ - put a script to be executed, instead of modifing /etc/profile
/etc/rc.d/rc.local - create this and it will be executed upon system startup
/etc/rc.d/rc.sysinit - this is executed at startup also (not recommended)
Just remeber to “export” the variable, and make sure that you logout completely, so the new
profiles can be executed.
-Adam
amallory@qnx.com
Operating System for Tech Supp a écrit :
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Still looking for a file where I can set an environment variable
(LD_LIBRARY_PATH) available for everybody in text mode AND in photon!There are lots of places you can try:
/etc/profile - this is read by each login, then the users .profile is sourced.
/etc/profile.d/ - put a script to be executed, instead of modifing /etc/profile
/etc/rc.d/rc.local - create this and it will be executed upon system startup
/etc/rc.d/rc.sysinit - this is executed at startup also (not recommended)Just remeber to “export” the variable, and make sure that you logout completely, so the new
profiles can be executed.-Adam
amallory@qnx.com
Absolutely not!!!
I tried to export LD_LIBRARY_PATH in each of these files, it works for root BUT ONLY root and
not for the normal users!
Why?
Thanks,
Alain.
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:
Absolutely not!!!
I tried to export LD_LIBRARY_PATH in each of these files, it works for root BUT ONLY root and
not for the normal users!
I just made a script called test.sh and chmod’d it +x , and inside of it put:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/thispath/is/new
Currently, I’m in photon and the new path is there. I did need to reboot
which forces all the startup code to re-source the scripts.
What version of QNX are you using (6.0(A,B,C)? 6.1?). Please post and example script that you
have placed in /etc/profile.d .
I have another suggestion if you do not wish to use /etc/profile.d method. You can
modify each user’s .profile file to source a global configuration file which can contain
you LD_LIBRARY_PATH.
-Adam
amallory@qnx.com
Operating System for Tech Supp <os@qnx.com> writes:
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I just made a script called test.sh and chmod’d it +x , and inside of it put:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/thispath/is/newCurrently, I’m in photon and the new path is there. I did need to reboot
which forces all the startup code to re-source the scripts.
You had to re-boot to set an environment variable? Are you sure QNX6
is a clean-room OS implementation, or did somebody sneak a peak at
some Microsoft code?
Andrew Thomas, President, Cogent Real-Time Systems Inc.
2430 Meadowpine Boulevard, Suite 105, Mississauga, Ontario, Canada L5N 6S2
Email: andrew@cogent.ca WWW: http://www.cogent.ca
Operating System for Tech Supp a écrit :
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Absolutely not!!!
I tried to export LD_LIBRARY_PATH in each of these files, it works for root BUT ONLY root and
not for the normal users!I just made a script called test.sh and chmod’d it +x , and inside of it put:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/thispath/is/newCurrently, I’m in photon and the new path is there. I did need to reboot
which forces all the startup code to re-source the scripts.
That’s right, after a reboot, it’s ok.
Thanks,
Alain.
…
-Adam
amallory@qnx.com
Andrew Thomas <andrew@cogent.ca> wrote:
Operating System for Tech Supp <> os@qnx.com> > writes:
You had to re-boot to set an environment variable? Are you sure QNX6
is a clean-room OS implementation, or did somebody sneak a peak at
some Microsoft code? >
No a reboot isi not “needed”, but is just simplier in some cases then trying
to make sure an environment variable has been propagated correctly.
-Adam
amallory@qnx.com
Operating System for Tech Supp a écrit :
Andrew Thomas <> andrew@cogent.ca> > wrote:
Operating System for Tech Supp <> os@qnx.com> > writes:You had to re-boot to set an environment variable? Are you sure QNX6
is a clean-room OS implementation, or did somebody sneak a peak at
some Microsoft code? >No a reboot isi not “needed”, but is just simplier in some cases then trying
to make sure an environment variable has been propagated correctly.-Adam
amallory@qnx.com
Anyway, I’d like to understand why setting vars in rc.local, rc.sysinit seems
not work for normal users in photon environment!
Thanks,
Alain.