Where to define environment variables, QNX6?

I need to add some directories to my search paths and
add some application-specific environment variables.

I’d like to do it once, and have the definitions apply to all
applications started subsequently.

I’ve tried placing ‘export’ commands inside rc.sysinit and
rc.local, and that does not work. No subsequent terminal
session has the newly-defined environment variables
available.

Is there some “trick” to setting environment variables in
a shell script and having them remain once the script is
finished executing?

Any suggestions?


Jeff Maass jmaass@columbus.rr.com Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: http://home.columbus.rr.com/jmaass

If I’m not mistaken the proper place to put these should be in ‘/etc/profile’, if all users should
benefit from the changes. ‘.profile’ in the home directory otherwise.

/Mikael

Jeff Maass wrote:

I need to add some directories to my search paths and
add some application-specific environment variables.

I’d like to do it once, and have the definitions apply to all
applications started subsequently.

I’ve tried placing ‘export’ commands inside rc.sysinit and
rc.local, and that does not work. No subsequent terminal
session has the newly-defined environment variables
available.

Is there some “trick” to setting environment variables in
a shell script and having them remain once the script is
finished executing?

Any suggestions?


Jeff Maass > jmaass@columbus.rr.com > Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: > http://home.columbus.rr.com/jmaass


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

On Tue, 23 Oct 2001 17:20:04 -0400, “Jeff Maass”
<jmaass@columbus.rr.com> wrote:

I need to add some directories to my search paths and
add some application-specific environment variables.

I’d like to do it once, and have the definitions apply to all
applications started subsequently.

I’ve tried placing ‘export’ commands inside rc.sysinit and
rc.local, and that does not work. No subsequent terminal
session has the newly-defined environment variables
available.

Is there some “trick” to setting environment variables in
a shell script and having them remain once the script is
finished executing?

Any suggestions?

I don’t know if this is EXACTLY to the point but might be a help:

  1. in any user’s .profile file, insert ENV=/etc/env. Then create
    a file /etc/env and edit globally desirable stuff like aliases.
    Make sure the file /etc/env is executable.
  2. if you run pterm out of Photon, run the shelf setup utility so
    that pterm starts with the “-l” option (ell for login) so the
    user’s .profile is un.


Jeff Maass > jmaass@columbus.rr.com > Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: > http://home.columbus.rr.com/jmaass

Bob Bottemiller
Stein.DSI/Redmond, WA USA