Google Chrome with proxies under Debian / Xfce

Something that seems to be a bit more difficult to solve than it should have been. Google Chrome expects to use Gnome/KDE’s network manager for proxy config. Under Xfce, this isn’t present so proxies can’t be configured in the usual manner (Options -> Under the Hood -> Network).

(note this refer’s to Google’s release of Chrome, not the chromium package)

The first step to fixing this is to launch chrome with the –proxy-server option:

/usr/bin/google-chrome --proxy-server=http://proxy.url.com:80

If a username and password is required, Chrome seems to understand and prompt you for one. I did try the format http://user:pass@proxy.url.com:80 but this didn’t work for me.

Second is to tell Xfce to use this option when launching the default web browser. I created a launcher script, then set the default web browser to this script in Xfce’s Preferred Applications (Xfce Menu -> Settings -> Preferred Applications).

With that, now when opening the web browser in Xfce (which uses the exo-open command) will launch chrome with the correct proxy settings.