Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

For my shell, I know that I have to modify .bashrc to add my ~/bin directory to the command path, but how do I get the Gnome Command Line applet to use that as a program location too?

I'm using v2.13.0.1 if that makes a difference

share|improve this question

1 Answer 1

Don't set PATH or any other environment variable in ~/.bashrc. .bashrc is a shell configuration file, you should use it only for shell configuration (such as prompts and aliases). Environment variables apply to all applications, so set them in your session initialization file. All methods for non-graphical logins (text mode console or remote login) read ~/.profile (unless you have an exotic shell); for graphical logins, ~/.profile is often read, but that depends on your distribution, display manager and desktop environment. Your desktop environment (Gnome) may have a way to set environment variables when you log in, too.

share|improve this answer
Unfortunately a quick test, adding export PATH=/scratch/bin:$PATH to my .profile and then logging out/back in doesn't allow me to run anything in /scratch/bin from the Gnome Command Line applet, so Gnome must not honour .profile on my system. – Mark Booth Oct 28 '11 at 10:37

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.