I've been trying to set some environment variables for hours and it does not work grml Here the setting:
I use Debian 6 and there the terminal from the desktop. In this window, I type "su" to login as root. There are two other users: myname and globus. Now I want to set the JAVA_HOME, ANT_HOME and PATH variable for ALL THREE USERS (root, myname, globus). Concerning to this article I edited the /home/myname/.profile and /home/globus/.profile added this:
export JAVA_HOME="/usr" ANT_HOME="/lib/apache-ant-1.8.2"
Now, when I login as globus (open Terminal from desktop and type "su globus") and echo $ANT_HOME, I get "/usr" and not the value above... beside this, I only get a "$" and the beginning of the line and not something like "root@mydebian: /current/path".
This is the content of my .profile:
# if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi JAVA_HOME=/usr/bin; export JAVA_HOME