Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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
  1. I made a shell script(bash), It's named

  2. Then I made also Desktop launcher in, ~/.local/share/applications/my.desktop

I thought 1) and 2) were the same. But they do not behave in the same manner: The two command receive different Environment variables. The process from "" has a "http_proxy" variable.

The process form my.desktop doesn't have a http_proxy variable.

I want to have the two commands use the same environment variables.

If have tried using the setting for my.desktop terminal=true, which causes that program to act the same as, but also causes a terminal to pop up, which I do not want.

share|improve this question
It would help to know what you are trying to do with the script – Charles Green Jun 19 '14 at 16:12

Simply change the Exec line in your .desktop file to run the script.

If this doesn't help add a line at the beginning of the script with cd folder-containing-the-script. Some scripts need this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.