Avitar Posted March 21, 2012 Share Posted March 21, 2012 Hey everyone. I´m currently on campus here in my university and they restrict their network with a proxy. Ubuntu Software Center and the terminal somehow cannot use the system-wide proxy settings and cannot seem to download the files. Can anyone help me with this? Link to comment Share on other sites More sharing options...
Avitar Posted March 21, 2012 Author Share Posted March 21, 2012 Thank you everyone for not helping <_< I´m sure if it was a girl you would´ve been jumping to her rescue. :angry:Oh well, solution found [no thanks to you guys!!!] Setting up apt-get to use a http-proxyThese are three methods of using apt-get with a http-proxy. How to login a proxy userIf you need to login to the Proxy server this can be achieved in most cases by using the following layout in specifying the proxy address in http-proxy. (substitute your details for username, password, yourproxyaddress and proxyport)http_proxy=http://username:password@yourproxyaddress:proxyport Temporary proxy sessionThis is a temporary method that you can manually use each time you want to use apt-get through a http-proxy. This method is useful if you only want to temporarily use a http-proxy.Enter this line in the terminal prior to using apt-get (substitute your details for yourproxyaddress and proxyport).export http_proxy=http://yourproxyaddress:proxyport APT configuration file methodThis method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.On some installations there will be no apt-conf file set up. This procedure will either edit an existing apt-conf file or create a new apt-conf file. gksudo gedit /etc/apt/apt.confAdd this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).Acquire::http::Proxy "http://yourproxyaddress:proxyport";Save the apt.conf file. BASH rc methodThis method adds a two lines to your .bashrc file in your $HOME directory. This method is useful if you would like apt-get and other applications for instance wget, to use a http-proxy.gedit ~/.bashrcAdd these lines to the bottom of your ~/.bashrc file (substitute your details for yourproxyaddress and proxyport)http_proxy=http://yourproxyaddress:proxyportexport http_proxySave the file. Close your terminal window and then open another terminal window or source the ~/.bashrc file:source ~/.bashrcTest your proxy with sudo apt-get update and whatever networking tool you desire. You can use firestarter or conky to see active connections.If you make a mistake and go back to edit the file again, you can close the terminal and reopen it or you can source ~/.bashrc as shown above.source ~/.bashrcapt-get and ubuntu software center works now :) Please note, anybody who ever reads this, that you need to do the four commands over everytime you reboot. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.