I'm trying to introduce a variable and add it to the global path in ubuntu 10.04. According to the official docs, /etc/environment is the right place. Here's what my example looks like:
GRADLE_HOME=/etc/gradle-0.9-preview-3
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$GRADLE_HOME/bin"
The GRADLE_HOME variable is added to the environment, but it's not interpreting the $GRADLE_HOME variable during the PATH assignment. Hard-coding it works fine. Not a big deal, but I'd like to know if variable substitution is supported, or if there's a better way to do this? Thanks!
This explanation from a related post appears to provide the answer:
Read the pam_env.conf(5) manpage.
I believe you need to add curly-braces around the variable name on the right-hand side: