Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use system proxy settings #36

Closed
laolux opened this issue Dec 7, 2020 · 10 comments · Fixed by #41
Closed

Unable to use system proxy settings #36

laolux opened this issue Dec 7, 2020 · 10 comments · Fixed by #41

Comments

@laolux
Copy link

laolux commented Dec 7, 2020

I just installed the chromium flatpak and cannot change the proxy settings.
Opening "settings -> advanced -> Open your computer's proxy settings" does open a new tab which reads

When running Chromium 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 chrome for more information on flags and environment variables.

I suppose some permission is missing.

Info about my system: Fedora 33, kernel 5.9.12, flatpak 1.8.3

EDIT: specifying the correct proxy on the command line when starting chromium works:

flatpak run org.chromium.Chromium --proxy-server=<address:port>
@andrunko
Copy link
Collaborator

andrunko commented Dec 7, 2020

Just to clarify, does chromium respects the settings if you configure via GNOME control center?

As for opening the settings UI from chromium settings, I did a quick check and this is done on chrome/browser/ui/webui/settings_utils_linux.cc which launches a system command depending on the environment it is running (GNOME, KDE, etc), so we probably need to special case here when running under flatpak sandbox to run the commands to open the settings via flatpak-spawn --host or something similar.

@wjt
Copy link
Member

wjt commented Dec 7, 2020

@andrunko
Copy link
Collaborator

andrunko commented Dec 7, 2020

Yes, but afaics the portal doesn't handle opening the system settings (maybe it should?), and chromium launches the configuration by calling the executables directly. I would be interested to know if chromium actually respects the settings configured though.

@laolux
Copy link
Author

laolux commented Dec 8, 2020

Just to clarify, does chromium respects the settings if you configure via GNOME control center?

No, it completely ignores the proxy settings. Using a locally installed chromium works out of the box, so it must be the flatpak that is ignoring the settings from the GNOME control center.

As for opening the settings UI from chromium settings, I did a quick check and this is done on chrome/browser/ui/webui/settings_utils_linux.cc which launches a system command depending on the environment it is running (GNOME, KDE, etc), so we probably need to special case here when running under flatpak sandbox to run the commands to open the settings via flatpak-spawn --host or something similar.

yes, when I try to open the proxy settings I get a warning message in my terminal window:

[2:2:1208/123458.525340:ERROR:settings_utils_linux.cc(54)] Could not find GNOME network settings in $PATH

@andrunko
Copy link
Collaborator

andrunko commented Dec 9, 2020

Thanks @laolux, I am looking at some options here. Looks like we will need to implement support for the ProxyResolver portal as noted by @wjt above.

@refi64
Copy link
Collaborator

refi64 commented Dec 9, 2020

To be clear, there are two issues here:

  1. Proxies not working
  2. Opening the proxy settings not working

The portal support mentioned above fixes the first but not the second. I'd imagine we could probably just open GNOME Settings over D-Bus to avoid adding the host execute permission, since the proxy settings are available through the search provider interface, but I'm not sure about KDE.

@andrunko
Copy link
Collaborator

Yes, for 2) I thought that we could even consider removing the button/link from the settings (and maybe replace it with just an info text), but interesting idea for launching via D-Bus, will have a think.

@laolux
Copy link
Author

laolux commented Dec 10, 2020

Thanks for taking care of this issue.

For 2), please do not remove the link, that could be confusing. Instead, simply replace the text. Currently, when I click on that link "Open your computer's proxy settings" a new tab opens with the text in my first post. I think adjusting that text would be good. Something along the lines:

The flatpak version of Chromium does not support changing the system proxy settings. However, it does respect those settings.
So, if you need to adjust the proxy settings, please do so through the configuration system of your desktop environment.

You can override your system proxy settings via the command line. Please see man chrome for more information on flags and environment variables.

@andrunko
Copy link
Collaborator

Thanks for taking care of this issue.

For 2), please do not remove the link, that could be confusing. Instead, simply replace the text. Currently, when I click on that link "Open your computer's proxy settings" a new tab opens with the text in my first post. I think adjusting that text would be good. Something along the lines:

The flatpak version of Chromium does not support changing the system proxy settings. However, it does respect those settings.
So, if you need to adjust the proxy settings, please do so through the configuration system of your desktop environment.

You can override your system proxy settings via the command line. Please see man chrome for more information on flags and environment variables.

@laolux Pushed a PR at #41 and went with a similar text as you suggested. Would be good if you could try it and let us know of any issue.

@laolux
Copy link
Author

laolux commented Dec 18, 2020

Works great! Also changing the proxy settings works without having to restart chromium.
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants