Proxy handling (Mint 13 MATE)

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Solar

Proxy handling (Mint 13 MATE)

Post by Solar »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
cygnus

Re: Proxy handling (Mint 13 MATE)

Post by cygnus »

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
karlchen
Level 23
Level 23
Posts: 18212
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Proxy handling (Mint 13 MATE)

Post by karlchen »

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:

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
jpht

Re: Proxy handling (Mint 13 MATE)

Post by jpht »

Hi,

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.

Cheers
Locked

Return to “Networking”