I want to set my Chrome with socks5 proxy.
chrome://linux-proxy-config/
To input the chrome://linux-proxy-config/
in Chrome, I'm presented with a page with this content:
When running Google Chrome under a supported desktop environment, the system proxy settings will be used. However, either your system is not supported or there was a problem launching your system configuration.
But you can still configure via the command line. Please see man
google-chrome
for more information on flags and environment variables.
I input the command in console:
google-chrome-stable --proxy-server="socks5://127.0.0.1:1080
Two effects for the above command:
effect1: I can go surfing now via socks5 proxy.
effect2: So many warnings info:
"Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank" [3873:3960:0808/102301.399211:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files [7:13:0808/102302.782729:ERROR:command_buffer_proxy_impl.cc(107)] ContextResult::kTransientFailure: Shared memory region is not valid [3873:4069:0808/102302.788747:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [3873:4069:0808/102302.789045:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
I want to fix effect2, that is to say, make the command run in background silently.
google-chrome-stable --proxy-server="socks5://127.0.0.1:1080 &
Effect2 still exist, it can't run in background, warning info still pop out in the console.
Try other way:
sudo gvim /usr/share/applications/google-chrome.desktop
#replace the `Exec=/usr/bin/google-chrome-stable --incognito` with
Exec=/usr/bin/google-chrome-stable --proxy-server="socks5://127.0.0.1:1080"
Run Chrome with its logo, Chrome can open, now I can't go surfing with the proxy socks5://127.0.0.1:1080
. How to fix it?
– Dominik Matis Aug 10 '19 at 08:29--proxy-server="socks5://127.0.0.1:1080" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1"
google-chrome.desktop
you likely have more than oneExec
line; the one that takes effect when you start Chrome—and that you should try editing—is that in the[Desktop Entry]
section, while the one you edited (with the--incognito
option) likely is in the[Desktop Action new-private-window]
section and only takes effect when you select theNew Incognito Window
entry from a context menu. 2) To silence a background job you may just redirect its output, e.g.google-chrome-stable --proxy... 1>/dev/null 2>&1 &
. – fra-san Aug 12 '19 at 13:01