Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

When I open SciTe from the terminal everything works fine. When I open it via Ubuntu 10.04 GUI drop down boxes I get this error every time I try to run a ruby program: sh: ruby: not found At this point I'm satisfied with knowing I can just open it from the terminal, but I'm curious why this difference might be occurring.

share|improve this question

If you have some custom PATH set in your shell startup scripts then you will have that in your shell, but the GUI environment doesn't source them and won't have your custom PATH. Any application spawned from the GUI will inherit the PATH from it, which won't have your custom PATH.

I use xfce, and I get around this by using a custom xinitrc that does source my shell init scripts and thus my GUI environment is the same as my shells.

share|improve this answer

You did something wrong when you change your configuration files. Specifically, you're setting PATH in a shell initialization file, probably ~/.bashrc, whereas you should be doing that in a session initialization file, probably ~/.profile. Environment variable definitions belong in ~/.profile. Shell configuration (aliases, shell options, …) belong in ~/.bashrc (or ~/.zshrc, etc.).

See also:
Difference between .bashrc and .bash_profile
Which setup files should be used for setting up environment variables with bash?

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.