chromium behind proxy with gnome shell or gnome 3 on fedora 15
Publicado; 14/06/2011 Arquivado em: internet, linux | Tags: chromium, fedora, gnome 3, gnome shell, network, proxy 4 Comentárioslast week I installed chromium on my fedora system at my work. like many companies, there is a proxy and, changing the settings under System settings/Network/Network Proxy was uneffective. setting environment variables as http_proxy and https_proxy was not working as well. so, I needed a more hardcore approach.
I edited the file /usr/share/applications/chromium-browser.desktop and, in the line with “Exec=/usr/bin/chromium-browser %U” I just appended “–proxy-server=http://MY_PROXY_IP:MY_PROXY_PORT” at the end of line. note, you must replace the MY_PROXY_IP and the MY_PROXY_PORT according to your needs.
you must be careful with updates: it’s very unlikely, but this file can be updated and, suddenly, this proxy will cease to work.
UPDATE: alternatively, you can create a local copy of the file /usr/share/applications/chromium-browser.desktop, place it in your desktop and edit it with the proxy settings.
UPDATE 2: there is a far more elegant solution.
- logged as root, edit the file /usr/bin/chromium-browser with following the command:
gedit /usr/bin/chromium-browser
- add the following lines on the line 75:
# proxy settings CHROMIUM_FLAGS="$CHROMIUM_FLAGS --proxy-server=MY_PROXY_IP:MY_PROXY_PORT --proxy-bypass-list=127.0.0.1,localhost"
- replace MY_PROXY_IP and MY_PROXY_PORT with the appropriate values and close and save the file.
and we’re done. of course, these are system-wide settings which can too be overwritten by an update, but I hope the next update will fix this issue with environment variables.
Chrom{e,ium} not picking up the GNOME 3 proxy is http://code.google.com/p/chromium/issues/detail?id=80453 …
thanks, anon. glad to see that they’re working on it. I’ll test this and update it later.
Unfortunately I use my laptop at both work and home. Work has a proxy and home doesn’t – I dont really want to keep editing files every time I want to run the browser 😦
Any ideas of an easier fix?
sure!
this method i showed in the post is not very good for this kind of situation… even after an chgromium upgrade, the changes are overwritten.
a better way is to create an custom chromium launcher for work, where you have a proxy environment. simply copy the one from the system, located in:
/usr/share/applications/chromium-browser.desktop
place it in your desktop, edit it with a text editor like gedit, search for a line beginning with “Exec” and add the following parameters to the command:
–proxy-server=MY_PROXY_IP:MY_PROXY_PORT –proxy-bypass-list=127.0.0.1,localhost
don’t forget to chmod +x the newly created chromium-browser.desktop, so you can execute it!
If you’re experiencing any kind of trouble or doubt, just let me know.