add Opera, Vivaldi, and Ungoogled Chromium support for Linux
This commit is contained in:
@@ -9,7 +9,7 @@ Adds a shortcut for running [JupyterLab](https://jupyter.org/) in a Chromium-bas
|
||||
* A Chromium-based browser
|
||||
* On Windows, [Google Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/), and [Microsoft Edge](https://www.microsoft.com/en-us/edge) are supported. Preference will be given to your default browser, if it appears to be a Chromium-based browser, or to the first one of these browsers found. Microsoft Edge is guaranteed to be installed on Windows 10+ and is a fall-back if no other supported browser is found.
|
||||
* On MacOS, [Google Chrome](https://www.google.com/chrome/), [Microsoft Edge](https://www.microsoft.com/en-us/edge), [Brave](https://brave.com/), and [Chromium](https://www.chromium.org/getting-involved/download-chromium/) are preferred in that order.
|
||||
* On Linux, [Google Chrome](https://flathub.org/apps/com.google.Chrome), [Microsoft Edge](https://flathub.org/apps/com.microsoft.Edge), [Brave](https://flathub.org/apps/com.brave.Browser), and [Chromium](https://flathub.org/apps/org.chromium.Chromium) are supported and preferred in that order. If [flatpak](https://flatpak.org/) is installed and one of these browsers is installed with Flatpak (recommended), it will be preferred over any snap-installed or package manager-installed versions of any of these browsers.
|
||||
* On Linux, [Google Chrome](https://flathub.org/apps/com.google.Chrome), [Microsoft Edge](https://flathub.org/apps/com.microsoft.Edge), [Brave](https://flathub.org/apps/com.brave.Browser), [Opera](https://flathub.org/apps/com.opera.Opera), [Vivaldi](https://flathub.org/apps/com.vivaldi.Vivaldi), [Ungoogled Chromium](https://flathub.org/apps/io.github.ungoogled_software.ungoogled_chromium), and [Chromium](https://flathub.org/apps/org.chromium.Chromium) are supported and preferred in that order. If [flatpak](https://flatpak.org/) is installed and one of these browsers is installed with Flatpak (recommended), it will be preferred over any snap-installed or package manager-installed versions of any of these browsers.
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -22,7 +22,15 @@ def find_flatpak_browser():
|
||||
# flatpak is not installed
|
||||
return
|
||||
|
||||
flatpak_apps = ("com.google.Chrome", "com.microsoft.Edge", "com.brave.Browser", "org.chromium.Chromium")
|
||||
flatpak_apps = (
|
||||
"com.google.Chrome",
|
||||
"com.microsoft.Edge",
|
||||
"com.brave.Browser",
|
||||
"com.opera.Opera",
|
||||
"com.vivaldi.Vivaldi",
|
||||
"io.github.ungoogled_software.ungoogled_chromium",
|
||||
"org.chromium.Chromium",
|
||||
)
|
||||
|
||||
try:
|
||||
flatpak_process = run(
|
||||
@@ -71,7 +79,15 @@ def find_browser():
|
||||
|
||||
elif platform.system() == "Linux":
|
||||
# prefers Google Chrome on Linux due to popularity of the browser
|
||||
cmds = ("google-chrome", "microsoft-edge", "brave", "chromium")
|
||||
cmds = (
|
||||
"google-chrome",
|
||||
"microsoft-edge",
|
||||
"brave",
|
||||
"opera",
|
||||
"vivaldi",
|
||||
"ungoogled-chromium",
|
||||
"chromium",
|
||||
)
|
||||
path_elements = map(Path, environ["PATH"].split(":"))
|
||||
|
||||
elif platform.system() == "Darwin":
|
||||
|
||||
Reference in New Issue
Block a user