Comment 5 for bug 556293

Revision history for this message
Peter Hagen (peter-willowmedia) wrote : Re: sudo does not keep http_proxy environment variable

In the final release of 10.04, after using sudo, the http_proxy setting is gone. The proxy setting has been set with the 'system wide' option. In a shell of a normal user, its visible:

>export
declare -x http_proxy="http://192.168.???.???:8080/"
declare -x https_proxy="https://192.168.???.???:8080/"
declare -x no_proxy="localhost,127.0.0.0/8,*.local,"

but, after a sudo -s, its gone:

>sudo -s
# export
... (no http_proxy)

the right information about the settings can be found in the /etc/enviroment file. I guess the sudo command doesn't look at this file, or it doesn't take the settings from the current user with it. This is why 'sudo wget...' and also the 'sudo apt-get install flash...' doesn't work. After sudo -s, add the proxy settings with: export http_proxy="http://192.168.???.???:8080", and then 'apt-get install...' it works flowless