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.