Linux Mint Network Proxy Preferences doesn’t affect command line apps

linux-mintnetworkingPROXYUbuntu

I am running Linux Mint 11 (Katya) with GNOME 2 and am behind a corporate proxy. I've gone into the Network Proxy Preferences and put in my auto-configuration URL, and this seems to work for things like Pidgin and Chrome (though not Thunderbird…), but it does not affect programs that I run from the terminal, e.g. ssh, telnet, git, et al. I have hit "Apply System-Wide…" button in Network Proxy Preferences, which prompts me for my password twice, but it doesn't seem to help.

Any thoughts?

Best Answer

Simply edit your /etc/profile file with ie, nano:

sudo nano /etc/profile

and at the end of the file add

http_proxy="http://user:password@foo_server:port"
https_proxy="http://user:password@foo_server:port"
ftp_proxy="http://user:password@foo_server:port"
export http_proxy ftp_proxy https_proxy

where foo_server is your proxy server, and port is the port you need to connect to your proxy server.

To check if the new settings are in use simple use type source /etc/profile and you can then check that the server is in use with (install curl if you don't have it yet)

curl icanhazip.com

that should return your proxy server's address.

Software like git, ssh, telnet, will tend to ignore those settings and use their own, I know that there are several utilities for ssh that allow you to do that. There wont be a unique, works for all way of doing it.

Maybe separate questions, regarding each service you want to use is a better option than asking for a global way of making it work, the short answer here would be: there is no global way.

Related Question