Configuring proxy settings for Google Chrome on Linux

10

3

How do I configure proxy settings for Chrome on Linux? It doesn't have a configuration interface like Firefox. I'd like to configure it in a way that I don't have to type every time, the login and password.

EDIT: I'm using Fluxbox as my window manager.

liewl

Posted 2009-12-14T12:27:44.677

Reputation: 391

Answers

7

Try the --proxy-server command line option, and/or http_proxy environment variable.

google-chrome-stable --proxy-server="http://example.com:8080"

Also, Chrome/Chromium makes use of xdg scripts, so you can try configuring the proxy server in GNOME/KDE, and set up xdg scripts to use settings of the desktop environment. That is how I solved MIME-type file associations at least.

Alexey Yakovenko

Posted 2009-12-14T12:27:44.677

Reputation: 239

Re the username and password auth in chrome using the --proxy-server parameter - this appears to be a bug in Chrome - please star the issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=615947

– hawkeye – 2016-05-31T10:20:49.837

How does one enable and disable the proxy connection within a running chrome instance? – Fopedush – 2016-06-07T16:33:07.757

2'google-chrome --proxy-pac-url=file:///...' works perfectly. There's no need to use http_proxy this no_proxy that. If you've got a pac file for use with firefox it'll work fine here. If you need help writing a .pac file google is your friend...

But you can still configure via the command line. Please see man google-chrome for more information on flags and environment variables. – RckLN – 2013-08-08T18:28:53.483

Calling the google chrome executable with the --proxy-server parameter worked fine, thanks. When browsing it pops up an authentication screen for every tab from the last session, is there a way to 'remember' the login and password, or make it authenticate automatically? using the --proxy-server parameter like --proxy-server="username:password@proxy-ip:port" didn't work. – liewl – 2009-12-14T17:55:07.640

2

On Ubuntu 16.04 LTS with Chrome v53 (64 bit), I had to set the http_proxy / HTTP_PROXY env variables to "http://proxyserver:port" for all users for Chrome to be able to communicate.

Modify /etc/profile

export {http,ftp,https,rsync}_proxy="http://proxyserver:port"
export {HTTP,FTP,HTTPS,RSYNC}_PROXY=$http_proxy

Gishu

Posted 2009-12-14T12:27:44.677

Reputation: 241

2

run this as root gedit /usr/share/applications/google-chrome.desktop then add your proxy settings as you would like ie --proxy-server="http://127.0.0.1:8080" then save and run chrome .

Patrick Mutwiri

Posted 2009-12-14T12:27:44.677

Reputation: 121

Can you explain how this works? – bwDraco – 2015-10-02T19:20:28.013

that's editing the chrome's app settings, so as to pick them during start. – Patrick Mutwiri – 2015-10-03T00:37:39.387

Instead of gedit, you can use whatever text editor you want, as 'vi' for example – pocjoc – 2017-11-21T07:52:47.593

Ofcourse @pocjoc – Patrick Mutwiri – 2017-11-29T06:54:33.063

1

Chrome uses the Proxy settings for your DE. If you use KDE it will use this. If you use Gnome it will use theirs. If you don't use either, I think it will try to use Gnome's, but not 100% sure.

If you go the the Wrench -> Under the Hood , you should have a button under Network labeled Change proxy settings. When I click this, in my case, it loads KDE Proxy settings.

If you don't use either KDE or Gnome, you could try browsing gconf , Chrome uses it to store it's settings.

Ryan Gibbons

Posted 2009-12-14T12:27:44.677

Reputation: 706

How should I proceed under Fluxbox? Do I have to set the proxy for the whole system? – liewl – 2009-12-14T17:56:02.350

Did going to the settings under the Wrench give you the option to Change Proxy Settings? – Ryan Gibbons – 2009-12-14T20:20:14.977

Nope, it shows a page giving explanations of possible ways to set up proxy configurations. Apparently i'd have to change the proxy settings on the OS itself, i'd like to set it only for chrome. – liewl – 2009-12-15T00:34:19.863

Doing a bit more reading out of curiosity, chrome either uses the system proxy or through the command switch. But now way to remember the username / password – Ryan Gibbons – 2009-12-15T03:24:43.200