Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Alternative user interfaces

2i2c hubs can run other web applications (for example VS Code, RStudio, Positron, or a desktop) inside the same user server. These rely on jupyter-server-proxy packages shipped in the user image (see Customize your user environment to add the proxy packages to your own image).

How it works

Once configured, users see new launcher tiles in JupyterLab. Each tile opens the selected interface in a new authenticated browser tab. Below we show an example for a Linux Desktop and QGIS.

JupyterLab launcher showing tiles for VS Code, RStudio, Terminal, and Desktop

Example launcher showing additional interfaces alongside the default Notebook tile.

Prerequisites

Your user image needs:

  1. The application binary (for example code-server, rstudio-server, or a desktop stack).

  2. The matching proxy package so Jupyter knows how to start and route to it.

  3. jupyter-server-proxy installed in the environment.

Many community-maintained images (for example Pangeo or Rocker stacks) already include these pieces. If you build your own image, add the proxy package with your package manager (for example pip install jupyter-vscode-proxy) so the launcher tile is registered. See Customize your user environment for guidance on building custom images.

Configure a profile that includes the interface

Expose an interface by pointing a profileList entry at an image that contains the app and proxy. Optionally, set default_url to the proxy route so users land in the right interface.

VS Code (code-server)

jupyter-vscode-proxy lets you proxy code-server (VS Code in the browser), allowing users to develop in VS Code without leaving the hub.

Here is an example from the Strudel hub that launches VS Code via code-server:

Pangeo images ship code-server with jupyter-vscode-proxy. This image is an example of one that already contains the required packages. You can substitute your own image if it includes code-server and jupyter-vscode-proxy.

jupyterhub:
  singleuser:
    profileList:
      - display_name: "VS Code"
        slug: "vscode"
        kubespawner_override:
          image: "pangeo/pangeo-notebook:2024.04.16"  # includes code-server + jupyter-vscode-proxy
          default_url: /vscode  # send users straight to VS Code

Pin to a specific image tag and adjust resource limits if your community needs more memory for VS Code.

Linux Desktop (VNC)

jupyter-remote-desktop-proxy lets you proxy desktop interfaces as well, allowing users to run GUI applications in the browser.

Here are examples for the desktop proxy (any image with jupyter-remote-desktop-proxy works):

Images with jupyter-remote-desktop-proxy expose a lightweight XFCE desktop for GUI tools such as QGIS. Use any image that includes jupyter-remote-desktop-proxy. The one below is for illustration.

jupyterhub:
  singleuser:
    profileList:
      - display_name: "Linux Desktop"
        slug: "desktop"
        kubespawner_override:
          image: "quay.io/2i2c/nasa-qgis-image:0d0765090250"  # includes jupyter-remote-desktop-proxy
          default_url: /desktop  # open the desktop interface
ArcGIS Desktop running in a browser via the remote desktop interface

Example remote desktop session running ArcGIS Pro through the desktop profile.

Licensed software (Positron, MATLAB, etc)

Some applications proxied this way require a license tied to your institution. 2i2c can mount a license file into user pods as an encrypted secret via KubeSpawner’s extraFiles, so the license never needs to live in your image. This requires opening a support request, since it involves handling secrets on the 2i2c side. Securing the license itself with the vendor is the community’s responsibility.

Positron

Positron is Posit’s data science IDE. It’s licensed under the Elastic License 2.0, which doesn’t permit hosting it as a service to third parties except under Posit’s Education Exception: access restricted to enrolled students or course participants, with any fees tied to instruction rather than software access.

There are two ways to run it on a 2i2c hub:

Either way, confirm with Posit that your license covers your planned deployment.

MATLAB

MATLAB uses the same pattern: your institution’s MATLAB license is mounted into the pod as an extraFiles secret, and MATLAB runs as an app inside the Linux Desktop interface.