OpenVPN / openvpn3-indicator

Simple GTK indicator GUI for OpenVPN 3 Linux
https://github.com/OpenVPN/openvpn3-indicator
GNU Affero General Public License v3.0
24 stars 2 forks source link

SSO always opened in Firefox #9

Closed Bassadin closed 2 months ago

Bassadin commented 2 months ago

Hey! Love the project. :)

My main browser is chrome and it is where I got my password manager, etc. running. However, when trying to connect to out VPN with the indicator, the SSO page is always opened with Firefox and I found no way to configure anything else. I'm running EndeavorOS with KDE Plasma 6 and have Chrome configured as my default browser there.

grzegorz-gutowski commented 2 months ago

I'm using webbrowser python module to open the browser. In my case it uses xdg-settings get default-web-browser command to determine the default web browser. What does the last command return in your system?

Bassadin commented 2 months ago

That command actually returns google-chrome.desktop for me :)

dsommers commented 2 months ago

@Bassadin What does this little Python snippet give you?

import webbrowser
b = webbrowser.get()
print(b.name)
Bassadin commented 2 months ago

@dsommers that one actually prints out firefox :D

dsommers commented 2 months ago

@Bassadin Okay, that's the difference then .... as on my system (RHEL-8), that snippet returns xdg-open; which should use whatever xdg-settings returns. The webbrowser Python module is provided by the Python packages, so I dunno what EndeavourOS has done so it returns firefox.

MartinLoeper commented 2 months ago

If the environment variable BROWSER exists, it is interpreted as the os.pathsep-separated list of browsers to try ahead of the platform defaults.

https://docs.python.org/3/library/webbrowser.html

So make sure to set your BROWSER env var accordingly as it takes precedence. ;)

Bassadin commented 2 months ago

That was it indeed! To add to it, my solution was to just set the BROWSER env var to undefined in my autostart config so that xdg-open takes over :)