Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

In order to speed up Android development, I've edited my ~/.bashrc to add some paths to PATH:

export PATH=${PATH}:/opt/android-sdk/tools:/opt/android-sdk/platform-tools

This works just fine from the command line (I can just type android and, no matter where I am, the Android SDK and AVD Manager will start up just fine.

However, if I try to type android in the Alt+F2 dialog (Run Application), it gives the following error:

Could not open location 'file:///home/felix/android'

Error stating file '/home/felix/android': No such file or directory

Why is that? What PATH does the Run Application dialog use?

share|improve this question
up vote 6 down vote accepted

I assume the bashrc is not read by Gnome, and why should it, since it is a config file for bash.

I define my path in ~/.profile. This file is definitely read by the Gnome and XFCE environments and should by others as well. (But it is read only on login, so you have to log out and back in any the changes to take effect!)

share|improve this answer
I moved the PATH= statement to ~/.profile and it works both in Alt+F2 and a terminal. Thanks. – Felix Jan 6 '11 at 9:49

~/.bashrc is included by ~/.profile by default. The ~/bin directory is added to PATH by default too. Create the ~/bin directory and add sym-links (ln -s) to applications you intent to use, or modify your ~/.bashrc.

The default content of the mentioned files can be found in /etc/skel -- used while creating new account and their home directories.

share|improve this answer
Yes, if .profile is being executed by a bash! The conditional checks for the $BASH_VERSION being defined, which Gnome won't do. And by the way, removing the condition will result in problems with some desktop environments, such as LXDE. – Carsten Thiel Jan 6 '11 at 10:25

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.