Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently solved my problem How to check if Network Proxy is really applied? Now I can use sudo apt-get install application-name easily - but the problem is that the normal user (not the superuser) cannot see the proxy.

For example, these commands have different outputs:



sudo wget

It shows that the first command does not use the proxy while the second clearly says:

Connecting to localhost||:8080... connected.

the strange thing is that when I check with Firefox, it shows the proxy IP not my real IP, which means that Firefox sees the proxy.

Why can't wget see the proxy?

share|improve this question

closed as too localized by Luis Alvarado Mar 14 '13 at 17:15

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you check that after doing Apply System-wide... that the following things happen :

  1. the file /etc/environment has entries with the proxy settings you specified.
  2. Any terminal program launched after closing the Network proxy dialog has the proxy variables set in their environment ?

    set | grep -i proxy

    should give you entries like this

    https_proxy =
    http_proxy =
    ftp_proxy =

wget as per the manual would use these proxies. I have it working at my laptop at work.

Are you sure, you have provided the wget command to a terminal process that was launched after the Network Proxy dialog was closed ?

share|improve this answer

I think this may actually be bug 232469, which has some proposed fixes and workarounds. One of them seems to be to edit /etc/wgetrc as root, and scroll down to where you see this:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy =
#http_proxy =
#ftp_proxy =

Uncomment (remove the #) and set the proxies you want to use. Save and close. This should set global wget-specific settings for all users, and should be an adequate workaround until the bug is resolved.

You can also add these settings to ~/.wgetrc and it will take effect on a per-user basis.

share|improve this answer
thanks for the note. i was made directly change proxy setting for apt-get too. so i should specify network proxy for each application separately. i think the Proxy Network is completely useless in Ubuntu. – Alexar Sep 15 '10 at 13:01
The Network Proxy app sets GNOME proxy settings, so yes, it only applies to applications which use them. – Jacob Peddicord Sep 15 '10 at 14:07
i don't like editing /etc/wgetrc/ as i would make to edit it again if i reinstalled ubuntu. is there any alternative file to edit in /home ? – Alexar Sep 24 '10 at 12:08
You can edit/create ~/.wgetrc and add the same settings, they will just only apply to your user and not root. Which should be fine for this situation. – Jacob Peddicord Sep 24 '10 at 14:13
In the bug report Jacob mentions, this comment and the next one are worth taking a look. – koushik Sep 24 '10 at 21:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.