This thread is now closed. The information can be found on the wiki here
Environment variables for a specific command
To set a variable for just a one off you can specify the variable on the command line itself as follows...
NAME=VALUE COMMAND PARAMETERS
http_proxy=http://localhost:8080/ apt-get update
NB: You can have multiple name=value pairs seperated by spaces.
Environment Variables for the shell/command line
To permanently add an environment variable you add the following lines to the relevant rc file. Th rc file is read whenever a terminal is opened from the ubuntu desktop. For a program that runs as a specific user you need to add them to the /home/username/.bashrc file. For programs that require sudo access you add these lines to the /root/.bashrc file.
Environment variables for the gnome desktop
To permanently add variables for the Gnome desktop, you add lines to the ??? file. Please add this information.
If you find more information on environment variables then please add them as a reply to this post. Corrections should be sent to the author of his or her post.