Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to modify or set environment variables in gnome or kde at runtime, ie. after logging in? I specifically need this for gnome, but knowing the kde method would be really useful too.

If it is useful, I ran into this while trying to run a java app that needed to run java 1.7, while the env said that JAVA_HOME was pointing to a (non existent) installation of java 1.4. I found the offending file in /etc/profile.d, changed that, sourced it in a shell, and it works in the shell. However, obviously, it doesn't change the environment in gnome, so an app launcher from the panel won't launch it (unless I use a wrapper or something), because it is still using the old JAVA_HOME value. So how can I change that without logging out and back in? Thanks.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.