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 have a brand-new Ubuntu 10.10 installed in a VMWare 7.1 Workstation. I am in a LAN and we're connected to Internet through a proxy which requires authentication.

I use 3 (three) browsers: The latest versions of Opera, Chrome and Firefox. Each one of them is set up to look for our proxy at the IP (example given) and the port 8081. Each one of them finds the proxy, asks for the username and the password and after this connects correctly to the Internet.

The same thing applies for the Synaptic Package Manager: Having the correct proxy data in the Settings -> Preferences -> Network it works ok.

However the Ubuntu Software Center fails to install any package which I will choose. The error(s) is/are Authentication failure.

Also in Terminal issuing a sudo apt-get install mypackage the APT cannot connect to the needed repository to fetch the data from there.

Also I mention that I have set up in the Ubuntu's Main Menu in System -> Preferences -> Network Proxy Preferences the correct values for proxy (IP address, port and the authentication bits: username & password).

The interesting thing is that if I do the following steps, it works:

  1. Start the Synaptic.
  2. Start the Ubuntu Software Center.
  3. Choose something to install from Ubuntu Software Center. It will throw a 'Waiting for Synaptic to close...'
  4. Close the Synaptic.
  5. Install what you want from the Ubuntu Software Center. (and perhaps also from terminal - not tested)

What I'm missing? How can I set up other programs (mainly the Terminal and the Ubuntu Software Center) to succeed connecting to internet?

UPDATE: Yes, I've pressed the Apply changes system-wide... in the Ubuntu's Network Proxy's dialog.

share|improve this question

I'm working in a similar environment, and I've solved the problem as follows:
1) install and configure CNTLM:
sudo apt-get install cntlm
sudo nano /etc/cntlm.conf
2) enter in cntlm.conf proxy settings & login credentials for your network
3) point your browser(s)' proxy settings to http://localhost:3128/
4) add these 3 lines to ~/.bashrc or to global /etc/bash.bashrc
export http_proxy=http://localhost:3128/
export https_proxy=http://localhost:3128/
export ftp_proxy=http://localhost:3128/
5) logout and login again: everything should work!


share|improve this answer
+1 for maintainability of this solution. However, for apt-get, it may be required to setup a proxy configuration in /etc/apt/apt.conf.d as well (in addition to the above). See this post for details. This is because (as thekorn mentioned in his answer) there is a known bug in software center regarding passing on proxy information. – koushik Oct 12 '10 at 12:04

No, I don't think you are missing anything, it is a bug which has already been reported as Bug 545134 on launchpad.

share|improve this answer

To set a proxy from a terminal you can do the following

export http_proxy='http://user:pass@host:port/'

or for a secure proxy

export https_proxy='http://user:pass@host:port/'

Add the respective line to ~/.bashrc to make the change permanent (and relogin).

Remember that it wouldn't work if there is any special character in your username or password.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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