0

It is most weird. I have set the environment variable TEST in .bashrc, .bash_profile, .profile, /etc/profile and /etc/profile.d/ - everywhere a sane computer might look for it:

TEST=successfull
export TEST

And when I open a terminal window, typing "echo $TEST" or "env" gives me the value of this variable nicely.

However, when I doubleclick an .desktop-file, the environment variable does not exist. And, strangely, when I fire up geany with a simple file containing

#!/bin/bash  
env
echo $TEST

, and execute it by pressing F5, it opens up a terminal window - and it won't show the value of TEST. If I start this same file from any terminal window - the environment variable is there as expected!!

This bothers me since its illogical and it blocks steam from running - steam requires the variable LD_LIBRARY_PATH. I put in "steam" in terminal - all loads fine. But if I doubleclick any steam icon - which does nothing more than execute "steam" with some parameters - nothing happens - because it cannot find its LD_LIBRARY_PATH.

I run Linux Mint LMDE with all updates installed. The same problem occurs wheter "gnome-terminal" or "mate-terminal" acts as gui frontend.

Can you reproduce? If yes, where is the bug?

migrated from serverfault.com Jul 28 '13 at 1:32

This question came from our site for system and network administrators.

0

It seems your desktop application does not inherit the variables you have set. Try to put: export TEST=successfull into your ${HOME}/.xinitrc, then restart X and see if it works.

-1

You have to put the variable in /etc/environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy