Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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

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?

share|improve this question

migrated from Jul 28 '13 at 1:32

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

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.

share|improve this answer

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

share|improve this answer

You must log in to answer this question.