There are a number of ways to set the proxy settings in Ubuntu and each way affects some applications and not others.
General applications
System wide proxy settings, except for terminal applications, can be set in System -> Preferences -> Network Proxy Preferences.
Simply enter the proxy server name and port. If your proxy requires authentication you will need to click on the Details button.
Then hit the Apply System Wide button and then close. Most applications such as Firefox will now be able to use and authenticate with the proxy.
Known Exceptions
Synaptic Package Manger
To set these the proxy on SPM you need to open SPM and go to Settings -> Preferences and then the Network tab. The settings are very similar to those above.
Terminal applications
In the rest of this I will be using http://username:password@proxy:port to describe the proxy settings. Obviously you should replace this with values that are suitable for your environment.
If your proxy does not require authenctication you can leave out the username:password@ and simply use http://proxy:port. If your authentication requires a domain you can use http://domain\username:password@proxy:port
Unfortunately the system wide settings don't seem to extend to the terminal. By adding the following lines to the end of your ~/.bashrc all applications in the terminal will be able to use your proxy.
export http_proxy=http://username:password@proxy:port export https_proxy=http://username:password@proxy:port export ftp_proxy=http://username:password@proxy:port
This will cover applications such as apt-get, curl, wget etc that are launched from the terminal.
Good to go
After performing these, your Ubunutu desktop will be able to access internet resources with ease. That is untill you are forced to change your password in 60 days and have to go through and reset all the above. See you again in 59 days :).



Comments