Compare commits
2 Commits
210fe834e8
...
0753a0d64c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0753a0d64c | ||
|
|
cb081651e9 |
12
README.md
12
README.md
@@ -1,6 +1,6 @@
|
||||
# App Mode Jupyter Environment and Shortcut
|
||||
|
||||
Adds a shortcut for running [JupyterLab](https://jupyter.org/) in a Chromium-based browser's "app" mode (i.e. The application takes up the full browser window and has no browser UI e.g. the address bar, as if Jupyter Lab were a native application) for an existing environment with Jupyter Lab installed or creating one for you.
|
||||
Adds a shortcut for running [JupyterLab](https://jupyter.org/) in a Chromium-based browser's "app" mode (i.e. The application takes up the full browser window and has no browser UI e.g. the address bar, as if Jupyter Lab were a native application) for an existing environment with JupyterLab installed or creating one for you. This is useful if you do not want to run an Electron app in addition to your browser or if you wish to use Jupyter like a desktop app, but do not have administrator access to install the JupyterLab desktop app.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,3 +54,11 @@ To remove the shortcut created by this script, run `python ./setup_jupyter.py --
|
||||
8. How should I update my Jupyter environment?
|
||||
|
||||
That's up to you. I will periodically run `conda update -n jupyter --all && conda update -n jupyter python` to update everything in my Jupyter environment (named `jupyter`).
|
||||
|
||||
9. Why not just use the JupyterLab desktop app?
|
||||
|
||||
The JupyterLab desktop app is based on the Electron framework, which has relatively high memory usage. Your chromium-based browser also has relatively high memory usage. Running JupyterLab in an app mode browser window allows it to share resources with your browser, which is you also probably have open anyway. JupyterLab desktop also requires administrator privileges to install (at least on Windows), but not all organizations permit their employees to have administrator privileges to install software. If you can install a conda-based Python distribution with only user privileges, then you can also use JupyterLab like a desktop app by opening it in a browser "app" window.
|
||||
|
||||
10. What about setting JupyterLab as the default app for .ipynb files? The JupyterLab desktop app can do that.
|
||||
|
||||
If I knew how to set file type associations, I would add that functionality to this script, but I don't currently have the necessary knowledge, nor do I have a MacBook to test it on MacOS.
|
||||
|
||||
@@ -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