Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Run a Linux Desktop on a JupyterHub

License

NotificationsYou must be signed in to change notification settings

jupyterhub/jupyter-remote-desktop-proxy

BinderTestLatest PyPI versionIssue tracking - GitHubHelp forum - Discourse

Run XFCE (or other desktop environments) on Jupyter.

This is based onhttps://github.com/ryanlovett/nbnovnc.

When this extension is launched it will run a Linux desktop on the Jupyter single-user server, and proxy it to your browser using VNC via Jupyter.

Screenshot of jupyter-remote-desktop-proxy XFCE desktop

VNC Server

This extension requires installing aVNC server on the system (likely in acontainer image). Compatibility with the latest version ofTigerVNC andTurboVNC is maintained and verified with tests, but other VNC serversavailable in$PATH asvncserver could also work. Thevncserver binaryneeds to accept theflags seen passed here, such as-rfbunixpath and a fewothers.

For an example, see theDockerfile in this repository whichinstalls either TigerVNC or TurboVNC together with XFCE4.

Installation

  1. Install this package itself, withpip fromPyPI:

    pip install jupyter-remote-desktop-proxy
  2. Install the packages needed to provide a VNC server and the actual Linux Desktop environment.You need to pick a desktop environment (there are many!) - here are the packagesto use TigerVNC and the light-weightXFCE4 desktop environment on Ubuntu 24.04:

    dbus-x11xfce4xfce4-panelxfce4-sessionxfce4-settingsxorgxubuntu-icon-themetigervnc-standalone-server

    The recommended way to install these is from your Linux system package managerof choice (such as apt).

Docker

To spin up such a notebook first build the container:

$ docker build -t$(whoami)/$(basename${PWD}).

Now you can run the image:

$ docker run --rm --security-opt seccomp=unconfined -p 8888:8888$(whoami)/$(basename${PWD})Executing the command: jupyter notebook[I 12:43:59.148 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret[I 12:44:00.221 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab[I 12:44:00.221 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab[I 12:44:00.224 NotebookApp] Serving notebooks fromlocal directory: /home/jovyan[I 12:44:00.225 NotebookApp] The Jupyter Notebook is running at:[I 12:44:00.225 NotebookApp] http://924904e0a646:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83[I 12:44:00.225 NotebookApp]  or http://127.0.0.1:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83[I 12:44:00.225 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).[C 12:44:00.229 NotebookApp]    To access the notebook, open this filein a browser:        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-8-open.html    Or copy and paste one of these URLs:        http://924904e0a646:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83     or http://127.0.0.1:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83*snip*

Now head to the URL shown and you will be greated with a XFCE desktop.

Note the--security-opt seccomp=unconfined parameter - this is necessaryto start daemons (such as dbus, pulseaudio, etc) necessary for linux desktopto work. This is the option kubernetes runs with by default, so most kubernetesbased JupyterHubs will not need any modifications for this to work.

Configuration

The VNC server will default to launching~/.vnc/xstartup.If this file does not exist jupyter-remote-desktop-proxy will use a bundledxstartup file that launchesdbus-launch xfce4-session.You can specify a custom script by setting the environment variableJUPYTER_REMOTE_DESKTOP_PROXY_XSTARTUP.

Limitations

  1. Desktop applications that require access to OpenGL are currently unsupported.

About

Run a Linux Desktop on a JupyterHub

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp