Proxy handling (Mint 13 MATE)

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
Level 1
Level 1
Posts: 6
Joined: Tue May 08, 2012 4:19 am

Proxy handling (Mint 13 MATE)

Post by Solar » Thu Nov 15, 2012 10:04 am

I just returned from a lengthy trial & error trying to set up a Mint 13 behind a corporate firewall / proxy, and unfortunately, I have to say that proxy handling in Mint 13 / MATE fails to impress.

The following issues were found:
  • Global proxy settings (Menu / Control Center / Network Proxy) are not honored by either the package manager, Firefox, or command line tools. (Actually I did not find any application that does honor these settings, and yes, I did reboot after setting them.)
  • Environment variables set in /etc/bash.bashrc or ~/.bashrc are not honored by Firefox either, even when the latter is started from the command line.
  • The Package Manager doesn't recognize system proxy settings, but you can set a proxy manually in the preferences. However, this does not affect e.g. command-line apt-get.
So I ended up with "system" proxy settings in the control center (which are apparently completely ignored), in Firefox, in the Package Manager, and as environment variables. Setting env_keep="http_proxy https_proxy ftp_proxy" in /etc/sudoers at least made sudo apt-get work.

But then I opened Control Center / Language Support, was told that there were missing language packs (as was expected)... and found that this dialog doesn't honor any of the aforementioned settings. It simply hangs trying to download the language packs. Since there is no way to enter proxy settings anywhere in the dialog, my attempts ended there. (No, I did not feel like copying the list of language packages into a terminal for manual apt-get'ing them. I gave up at that point.)

Perhaps this post can be put in the appropriate channels by people more involved with the Mint community: Currently proxy handling is a disgrace. I admit that some of the issues aren't strictly in the domain of the Mint maintainers, but I don't really care about the maintainer side of things. From a user perspective, it sucks, and royally so.

Level 1
Level 1
Posts: 11
Joined: Thu Nov 15, 2012 11:34 am

Re: Proxy handling (Mint 13 MATE)

Post by cygnus » Mon Dec 17, 2012 12:05 pm

I've set up MATE in Ubuntu 12.04 (I switch back and forth between MATE and Cinnamon - I like them both). I've had proxy issues with whatever DE I've used in Ubuntu - Unity, Cinnamon, MATE - so it's not something that is limited to just the Mint community. I've done the following to make most things work:

1 - APT: Go to /etc/apt and create a file called apt.conf (you can also go to /etc/apt/apt.conf.d/ and create a file there, like 95proxy) and add in the following lines, replacing URL and PORT with your proxy:

Acquire::http::proxy "http://URL:PORT/";
Acquire::ftp::proxy "ftp://URL:PORT/";
Acquire::https::proxy "https://URL:PORT/";

This will cause apt-get to work via command line

2 - Firefox: The only version of Linux that I've used where Firefox knows how to use the system proxy is Ubuntu 10.04. I just put the proxy manually in the advanced preferences under network and it works fine.

3 - Update Manager, other GTK3 applications - This is a strange one. When I'm using a GTK3 DE like Unity or Cinnamon, I can use the built-in network proxy setting and it will pass through to the GTK3 applications. When I'm using MATE, which is a GTK2 DE, it doesn't. So I just set the following in the command line and it works (of course replace URL and PORT with your info):

gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http host 'URL'
gsettings set org.gnome.system.proxy.http port PORT
gsettings set org.gnome.system.proxy.https host 'URL'
gsettings set org.gnome.system.proxy.https port PORT
gsettings set org.gnome.system.proxy.ftp host 'URL'
gsettings set org.gnome.system.proxy.ftp port PORT

So far I haven't seen any place where the MATE network proxy settings do anything, but I haven't tried any Internet-connected GTK2 programs. I'm assuming that they would follow the MATE proxy settings but that's just an assumption, I haven't tested the hypothesis yet.

I hope this helps. Yes, proxy settings aren't great in Mint, but they aren't great in ANY Linux distro that I've used either.

User avatar
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Proxy handling (Mint 13 MATE)

Post by karlchen » Mon Dec 17, 2012 1:12 pm

Hello, Solar and Cygnus.

I do agree with you that proxy handling throughout any Ubuntu / Linux Mint system, not just Mint 13, is far from being as consistent as it is inside Windows. So there definitely is a lot of room for improvement.

Having said so I do not want to leave you and other potential readers without the workaround which I applied to my office machine and which makes life a lot easier. No reboot required after any change by the way.
  • Systemwide proxy setting set by Network Manager: Yes, I do set them and apply them systemwide. And they will be homoured e.g. by Firefox, provided you instruct it to use the systemwide proxy-setings. (Preferences => Network => Connections => Preferences => Use sytem-wide proxy settings)
  • Synaptic Package Manager: no, it does not honour the systemwide proxy settings. So I have to define the proxy settings under Preferences => Preferences => Network => Manual Proxy configuration. - Can be switched on and off at any time.
    Making Synaptic and the commandline programmes which Synaptic launches use the (same) proxy: Being behind an HTTP proxy requiring NT authentication, I had to resort to a little workaround:
    Installed cntlm, available through the Ubuntu repositories. cntlm will listen on port 5865 here, the default port 3128 would be ok as well. You put the logon credentials for your proxy into the cntlm config file. Then tell Synaptic to use localhost:5865 as its proxy. Works like a charm.
Hope this helps make life a bit easier for anyone. :wink:

Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

Level 1
Level 1
Posts: 1
Joined: Thu Jan 17, 2013 10:30 am

Re: Proxy handling (Mint 13 MATE)

Post by jpht » Thu Jan 17, 2013 10:37 am


I am facing similar issues with proxy handling. Your first bullet point sounds interesting (at least worth testing). Are you using dispatcher scripts for this? Any examples of scripts? I've tried to manually set gnome proxy settings (not mate) using gconf-editor and does not seem to work.


Post Reply

Return to “Other networking topics”