Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Add additional directories to PATH and LD_LIBRARY_PATH at startup: (2 Items)
   
Add additional directories to PATH and LD_LIBRARY_PATH at startup  
Hello,

My target system is a PC running Neutrino natively, but I also want to do this in a vmware image.

I am trying to add two entries to the environment variables PATH and LD_LIBRARY_PATH so that I can keep my binaries and 
libraries in separate locations from the normal /bin and /lib paths.

I have read the help on "How Neutrino Starts" and understand that I cannot use rc.local to add these as a different 
shell gets started by init.

I could do this in the .profile of the user and export it, but I don't think this allows Momentics to see the libs when 
debugging or running.

Is there someplace in the startup scripts (before someone logs in) that I can set these variables and have them be 
effective system wide?

Thanks for the help.

- Mike
 
Re: Add additional directories to PATH and LD_LIBRARY_PATH at startup  
You can update these in your build file on the procnto line, and set new default values:

http://www.qnx.com/developers/docs/6.3.2/neutrino/utilities/m/mkifs.html

...
The contents of the host file that this attribute applies to are parsed to discover the bootstrap executables used to 
bring up the system. Each line identifies one bootstrap executable:

    * The first executable must be the QNX Neutrino startup executable (startup-*) that's appropriate for the target 
system. For more information, see Startup programs (startup-*) in the Utilities Summary.
    * The last must be procnto. Specifying the PATH and LD_LIBRARY_PATH environment variables before procnto sets their 
default values in the OS image.
...

ie PATH=/bin:/sbin:/mybins LD_LIBRARY_PATH=/lib:/usr/lib:/mylibs procnto

Hope this helps.

Peter