I have Ubuntu 10.04. I want to define some environment variables that will be available anywhere, anytime, including from Eclipse. Where is the best place to put them? ~/.bashrc? ~/.profile? /etc/environment?

Why are there so many places to define settings?

link|improve this question
What desktop environment are you using? What window manager? – Keith Aug 28 '11 at 11:39
I use gnome desktop. How can I know what window manager I use? – Erel Segal Sep 4 '11 at 6:32
@Erel: If you're using a full DE such as GNOME or KDE, the window manager is not important. (GNOME uses either Metacity, Compiz, or Mutter.) It only makes a difference when the WM is being used standalone. – grawity Dec 15 '11 at 14:04
feedback

1 Answer

up vote 0 down vote accepted

~/.profile might be the best place – it is read for graphical logins (GDM), console logins, and even SSH. (The latter two only if neither ~/.bash_profile nor ~/.bash_login exists, though... but GDM always reads it.)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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