Skip to content

Instantly share code, notes, and snippets.

@egormkn
Last active August 10, 2023 14:42
Show Gist options
  • Save egormkn/672764e7ce3bdaf549b62a5e70eece79 to your computer and use it in GitHub Desktop.
Save egormkn/672764e7ce3bdaf549b62a5e70eece79 to your computer and use it in GitHub Desktop.
Running JupyterLab as a desktop application on Linux

GNOME Desktop icon for Jupyter Lab

Installation

  1. Copy jupyter-lab.desktop to ~/.local/share/applications
  2. Copy jupyter-lab.svg to ~/.local/share/icons
  3. Restart gnome-desktop session (Alt+F2 -> restart)
[Desktop Entry]
Name=Jupyter Lab
Comment=Start Jupyter Lab server
Comment[ru_RU]=Запуск сервера Jupyter Lab
Exec=gnome-terminal --class jupyter-lab -x jupyter lab --port 8888
Icon=jupyter-lab
Type=Application
Categories=Development;
StartupNotify=true
StartupWMClass=jupyter-lab
Actions=open-browser
[Desktop Action open-browser]
Name=Open in browser
Name[ru_RU]=Открыть в браузере
Exec=xdg-open http://localhost:8888/lab
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ParhamHasani
Copy link

thank you, It worked for me. first of all, I downloaded my favorite icon from Google and downloaded it with the new name of Jupyter-lab.png
after that, I moved this png file to ~/.local/share/icons with this code on the terminal:
sudo mv jupyter-lab.png ~/.local/share/icons

I create a text on my desktop in the terminal with this code:
touch jupyter-lab.desktop
then I copied these lines to this file. (Change [MYCOMPUTERNAME] with your computer name)
[Desktop Entry] Name=Jupyter Lab Comment=Run Jupyter Lab Exec=/home/[MYCOMPUTERNAME]/anaconda3/bin/jupyter-lab Icon=/home/[MYCOMPUTERNAME]/.local/share/icons/Jupyter-lab.png Type=Application Categories=Development;Education StartupNotify=true StartupWMClass=jupyter-lab Actions=open-browser
then I copied this file to ~/.local/share/applications by this code on terminal:
mv jupyter-lab.desktop ~/.local/share/applications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment