Monday, June 24, 2013

Ubuntu: Set Network proxy system-wide including Terminal

ubuntu

Set the proxy in "Network Proxy" setings and click "apply system-wide", and also at the following locations. Some terminal applications need them.

sudo gedit /etc/apt/apt.conf.d/95proxies
Acquire::http::proxy "http://username:passwd@proxy:port/";
Acquire::ftp::proxy "ftp://username:passwd@proxy:port/";
Acquire::https::proxy "https://username:passwd@proxy:port/";
sudo gedit .bashrc
export http_proxy=http://username:passwd@proxy:port
export https_proxy=http://username:passwd@proxy:port
export HTTP_PROXY=http://username:passwd@proxy:port
export HTTPS_PROXY=http://username:passwd@proxy:port

Requires both CAPITALS and small ones. Some applications accepts only CAPITALS.