I have tested this with Ubuntu 14.04
First go to system settings > Network > Network Proxy
and fill ‘Proxy’ and ‘Port’
Then click on ‘Apply system wide’

Now open apt.conf file

gksudo gedit /etc/apt/apt.conf

and add this

Acquire::http::proxy "http://username:password@proxy_ip:port/";
Acquire::https::proxy "https://username:password@proxy_ip:port/";
Acquire::ftp::proxy "ftp://username:password@proxy_ip:port/";
Acquire::socks::proxy "socks://username:password@proxy_ip:port/";

Take care of every semi-colon and slash. Save this,

Now open this ‘environment’ file. For this file you may need sudo password

nano /etc/environment

and add this

http_proxy="http://username:password@proxy_ip:port/"
https_proxy="https://username:password@proxy_ip:port/"
ftp_proxy="ftp://username:password@proxy_ip:port/"
socks_proxy="socks://username:password@proxy_ip:port/"

save file and then logout user to check settings. Use this command

set | grep -i proxy

and check if you see any variables now. If yes then you have successfully enabled proxy.
Now open firefox and check if it asks for password on startup. Then enter proxy username and password and Boom :).

Advertisements