Mailinglist Archive: opensuse-packaging (140 mails)

< Previous Next >
Re: [opensuse-packaging] Setting environmental variables
Hi Robert,

Am 20.01.12 15:05, schrieb Robert Munteanu:

I have a package (maven) which relies on the presence of a environment
variable (MAVEN_HOME) . I have created /etc/profile.d/maven.{csh,sh}
but these only work after the user logs out.

How can I make the environment variable available immediately after
the package is installed?

That is not possible because the environment is inherited. You cannot
modify the environment of an arbitrary process, just the own environment
which is inherited by all processed started by itself.

Of course one can manually source /etc/profile.d/*.sh in a shell to
avoid having to re-login, but that cannot be automated.

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >