where to add env vars for apps? - Unix

This is a discussion on where to add env vars for apps? - Unix ; I have a development version of Gimp installed in /opt. In order to find its help files, it needs to have the following environment variable defined: GIMP_HELP_ENV_URI = file:///usr/share/gimp/2.0/help Where is the customary place to define such things? It is ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: where to add env vars for apps?

  1. where to add env vars for apps?

    I have a development version of Gimp installed in /opt. In order to
    find its help files, it needs to have the following environment
    variable defined:

    GIMP_HELP_ENV_URI = file:///usr/share/gimp/2.0/help

    Where is the customary place to define such things? It is my
    understanding that such settings in .bashrc only effect terminal
    sessions. I am using two flavors of Linu:x Fedora and Ubuntu.

    Thanks,

    --
    Colin Brace
    Amsterdam


  2. Re: where to add env vars for apps?

    On 5 Mar 2006 08:03:03 -0800, Colin Brace wrote:
    > I have a development version of Gimp installed in /opt. In order to
    > find its help files, it needs to have the following environment
    > variable defined:
    >
    > GIMP_HELP_ENV_URI = file:///usr/share/gimp/2.0/help
    >
    > Where is the customary place to define such things?


    Depends on the requirements. global, local, user, terminal,....
    and which shell, bash, sh, csh, ......

    > It is my
    > understanding that such settings in .bashrc only effect terminal
    > sessions. I am using two flavors of Linu:x Fedora and Ubuntu.



    http://groups.google.com/advanced_group_search
    path env search_tag in the First box
    *linux* in the Newsgroup box.

    Pick the "how to" thread.


  3. Re: where to add env vars for apps?

    Colin Brace wrote:
    > I have a development version of Gimp installed in /opt. In order to
    > find its help files, it needs to have the following environment
    > variable defined:
    >
    > GIMP_HELP_ENV_URI = file:///usr/share/gimp/2.0/help
    >
    > Where is the customary place to define such things? It is my
    > understanding that such settings in .bashrc only effect terminal
    > sessions. I am using two flavors of Linu:x Fedora and Ubuntu.
    >
    > Thanks,
    >


    In general, put it most close to the application!
    Have a shell wrapper called gimp:

    #!/bin/sh
    GIMP_HELP_ENV_URI = file:///usr/share/gimp/2.0/help
    export GIMP_HELP_ENV_URI
    prog=gimp
    dir=/path/to/binary
    PATH=${dir}:$PATH
    export PATH
    [ -x $dir/$prog ] && exec $prog "$@"


    --
    Michael Tosch @ hp : com

+ Reply to Thread