# Run Linux Desktop Apps in mybinder.org / your JupyterHub

**URL:** https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964
**Category:** Show and Tell
**Tags:** announcement
**Created:** [December 1, 2021, 10:38am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964 "2021-12-01T10:38:04Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)
#### Post date: [December 1, 2021, 10:38am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/1 "2021-12-01T10:38:04Z")

</div>

The excellent [jupyter-remote-desktop-proxy](https://github.com/jupyterhub/jupyter-remote-desktop-proxy) enables you to run arbitrary Linux desktop applications in [mybinder.org](http://mybinder.org) or on your own JupyterHub! Here are a few fun examples:

- [qgis](https://mybinder.org/v2/gh/yuvipanda/jupyter-desktop-server/qgis?urlpath=desktop), a very popular Geospatial application (via [@giswqs](https://github.com/giswqs/jupyter-qgis))  

- [ds9](https://mybinder.org/v2/gh/yuvipanda/ds9-binder/master?urlpath=%2Fdesktop) a popular application for viewing some astro file formats

Basically anything you can run on a Linux desktop can run inside your browser, with fairly usable latencies. This is extremely helpful when part of your workflow might involve pre-developed scientific software that is not really web friendly. It’s also cool, so there’s that.

I’ve developed a [template repository](https://github.com/yuvipanda/binder-desktop-app-template) with instructions on how you can make your own binderable repo that can run any desktop app you want. There’s more work to be done in the upstream library, but this should hopefully help you play with unlocking new scientific and educational workflows that were not possible before.

Special thanks to my friend [Sanjay Bhangar](https://twitter.com/sanjaybhangar) for recent encouragement!

---

<div class="post-metadata">

### Author: ![William\_Stein](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/william_stein/32/2312_2.png) [@William\_Stein](https://discourse.jupyter.org/u/William_Stein)
#### Post date: [December 1, 2021, 5:20pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/2 "2021-12-01T17:20:26Z")

</div>

Very cool! Jason Grout wanted me to post that I implemented something similar for CoCalc – [CoCalc – Run X11 Desktop Graphical Linux Applications](https://cocalc.com/features/x11)

User feedback is interesting, since this can make it possible for them to do solve subtle edge case problems. E.g., often people run Firefox this way, or a random obscure ancient Java UI library for some scientific application.

---

<div class="post-metadata">

### Author: ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)
#### Post date: [December 2, 2021, 5:46am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/3 "2021-12-02T05:46:29Z")

</div>

Wow, [https://xpra.org/](https://xpra.org/) looks super cool, @William_Stein! Thank you for sharing that! Have you had experience with people running stuff that requires GL / GPUs on it? How has that been?

---

<div class="post-metadata">

### Author: ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)
#### Post date: [December 2, 2021, 5:48am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/4 "2021-12-02T05:48:56Z")

</div>

I’ve discovered that [GitHub - FZJ-JSC/jupyter-xprahtml5-proxy: Jupyter extensions for running a Xpra Session proxy](https://github.com/FZJ-JSC/jupyter-xprahtml5-proxy) exists as well!

---

<div class="post-metadata">

### Author: ![William\_Stein](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/william_stein/32/2312_2.png) [@William\_Stein](https://discourse.jupyter.org/u/William_Stein)
#### Post date: [December 2, 2021, 7:25pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/5 "2021-12-02T19:25:46Z")

</div>

I don’t have such experience. If you want to test out what we wrote via Docker, install this [GitHub - sagemathinc/cocalc-docker: Docker setup for running CoCalc as downloadable software on your own computer](https://github.com/sagemathinc/cocalc-docker) and it is easy to then use our xpra integration…

---

<div class="post-metadata">

### Author: ![jlphillips](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jlphillips/32/5446_2.png) [@jlphillips](https://discourse.jupyter.org/u/jlphillips)
#### Post date: [December 3, 2021, 7:57pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/6 "2021-12-03T19:57:03Z")

</div>

This has really been a great help for my students, so thank you for your work on this @yuvipanda ! We have been using it for the last month or so on our JHub/JLab servers. We have had to check over network policy and ensure traffic is limited to prevent intruder access, but that’s all very reasonable for something like this.

---

<div class="post-metadata">

### Author: ![pll\_llq](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/pll_llq/32/5004_2.png) [@pll\_llq](https://discourse.jupyter.org/u/pll_llq)
#### Post date: [December 4, 2021, 2:54pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/7 "2021-12-04T14:54:46Z")

</div>

Hey, this is a great post!

Is it possible to run the application from a container (say if the container exposes vnc)?

---

<div class="post-metadata">

### Author: ![psychemedia](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/psychemedia/32/24_2.png) [@psychemedia](https://discourse.jupyter.org/u/psychemedia)
#### Post date: [December 6, 2021, 12:19pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/8 "2021-12-06T12:19:32Z")

</div>

The remote desktop route also gives you the opportunity to run some old Windows desktop apps under wine, eg [GitHub - ouseful-demos/jupyter-desktop-server: Run a Linux Desktop on a JupyterHub - Wine Demo](https://github.com/ouseful-demos/jupyter-desktop-server)

One issue I’ve found with a lot of remote web desktops is that video can be choppy and audio support either not available or a hassle to try to figure out… (RDP tends to work a bit better, IIRC.)

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [December 11, 2021, 9:39pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/9 "2021-12-11T21:39:21Z")

</div>

I’m trying to get web-based RDP working for another side-project using [Guacamole](https://guacamole.apache.org/)… I’ll let you know if it works 🙂

---

<div class="post-metadata">

### Author: ![psychemedia](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/psychemedia/32/24_2.png) [@psychemedia](https://discourse.jupyter.org/u/psychemedia)
#### Post date: [December 13, 2021, 2:56pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/10 "2021-12-13T14:56:31Z")

</div>

@manics - re: RDP; that could be interesting:-) I don’t think I ever tried to get RDP sessions running from MyBinder; I think I (re)used a Linux-RDP container on hosting elsewhere with all my RDP experiments.

–tony

---

<div class="post-metadata">

### Author: ![vvcb](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/vvcb/32/9346_2.png) [@vvcb](https://discourse.jupyter.org/u/vvcb)
#### Post date: [March 18, 2023, 6:42pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/11 "2023-03-18T18:42:27Z")

</div>

Hi,

I am looking at Guacamole as well but in a slightly different context. I have been working on Trusted Research Environments for the past few years and z2jh has been a central part of it.

However, this is currently served through a remote desktop environment with additional safeguards against downloading, copy+paste, etc.

I was wondering if there was a way to serve the remote desktop environment (preferably through Apache Guacamole) through JupyterHub (either the same z2jh instance or a separate one) and make the actual analytics workspace with sensitive data available through this.

ie. The first _singleuser\_server_ brings up Guacamole and the actual _analytics workspace pod_ is only acccessible from within Guacamole. And, this could be enforced through network policies (eg. Calico).

Does this even make sense? Something like a stripped-down, cloud-agnostic, k8s native version of [https://microsoft.github.io/AzureTRE/](https://microsoft.github.io/AzureTRE/).

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [March 20, 2023, 2:26pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/12 "2023-03-20T14:26:18Z")

</div>

I’ve got an old (private) GitHub repo where I tried running Guacamole in an (independent) container alongside the singleuser server, with access via [GitHub - ideonate/jhsingle-native-proxy: Wrap an arbitrary webapp so it can be used in place of jupyter-singleuser in a JupyterHub setting](https://github.com/ideonate/jhsingle-native-proxy). It spins up VMs using a custom spawner (needed to support Windows desktops as well as Linux- Windows containers don’t support desktops), but if it’s Linux only I think doing it in Z2JH with a customised KubeSpawner shouldn’t be too difficult.

---

<div class="post-metadata">

### Author: ![vvcb](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/vvcb/32/9346_2.png) [@vvcb](https://discourse.jupyter.org/u/vvcb)
#### Post date: [March 21, 2023, 12:15am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/13 "2023-03-21T00:15:57Z")

</div>

And, if we set it up so that any time a user requests a ‘workspace’ aka ‘server’, the following happens:

2 containers get spun up - ideally as 2 separate pods (rather than 2 containers in a pod)

- Pod A: Lightweight, Linux desktop environment with limited tools and a modern browser, wrapped in Guacamole.
- Pod B: The usual single user server with a choice of interfaces running on customisable compute, etc.
- Pod A and Pod B can potentially be scheduled to run on different node pools with different resources, etc.

Pod B is only accessible from Pod A - enforced through network policy ?Calico.

Persistent storage is disabled on Pod A so that even if the user downloads data from JupyterLab served via Pod B - this ends up in Pod A which is entirely ephemeral and is lost when the user has to shutdown the server to access a different workspace. Pod A (Guacamole) prevents removal of data from the desktop environment.

Pod B gets its persistence storage through PV/PVC, in our case Azure File storage.

This prevents moving data from one workspace to another. Let’s discuss when we talk on Wednesday.

Let’s drag one more person to the party 🙂

@yuvipanda - I have been looking at this → [[Request for Implementations] Disabling downloads from a JupyterHub](https://discourse.jupyter.org/t/request-for-implementations-disabling-downloads-from-a-jupyterhub/7613) in the context of this → [Secure data environment for NHS health and social care data - policy guidelines - GOV.UK](https://www.gov.uk/government/publications/secure-data-environment-policy-guidelines/secure-data-environment-for-nhs-health-and-social-care-data-policy-guidelines).

Will be great to get your thoughts. NHS England has budgeted £100m for Secure Data Environments and seeing that a major chunk of data science happens within the Jupyter universe, will be good to discover what is possible and what has already been done. I love z2jh and will be great to see what others are doing in this space.

---

<div class="post-metadata">

### Author: ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)
#### Post date: [June 29, 2023, 12:47am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/14 "2023-06-29T00:47:45Z")

</div>

@vvcb as far as I know, nobody has really worked on anything in [[Request for Implementations] Disabling downloads from a JupyterHub](https://discourse.jupyter.org/t/request-for-implementations-disabling-downloads-from-a-jupyterhub/7613). Would love to get people working on it! I think most of the items there are fairly straightforward if a bunch of work…

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [July 4, 2023, 8:26pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/15 "2023-07-04T20:26:32Z")

</div>

I’ve worked around the need to block/limit copy/paste/download by using Apache Guacamole to provide access to a Jupyter desktop. The advantage of guacamole over NoVNC is it runs separately from the desktop so you don’t need a custom image, and you can disable the clipboard server-side:

> **[GitHub - manics/jupyter-guacamole: ⚠️⚠️⚠️⚠️⚠️ Under development, insecure, do...](https://github.com/manics/jupyter-guacamole)**
>
> ⚠️⚠️⚠️⚠️⚠️ Under development, insecure, do not use! ⚠️⚠️⚠️⚠️⚠️ - GitHub - manics/jupyter-guacamole: ⚠️⚠️⚠️⚠️⚠️ Under development, insecure, do not use! ⚠️⚠️⚠️⚠️⚠️

There’s an example Z2JH config in there.

You can also use Guacamole to access Windows cloud desktops launched with a custom JupyterHub spawner if you really want 😀

> **[GitHub - manics/jupyterhub-virtualdesktopspawner: Run Linux or Windows...](https://github.com/manics/jupyterhub-virtualdesktopspawner)**
>
> Run Linux or Windows desktops with JupyterHub on public cloud and Kubernetes - GitHub - manics/jupyterhub-virtualdesktopspawner: Run Linux or Windows desktops with JupyterHub on public cloud and Ku...

[https://user-images.githubusercontent.com/1644105/236957323-5efb2a6c-0e4e-434c-a1e9-bd9a732f0589.webm](https://user-images.githubusercontent.com/1644105/236957323-5efb2a6c-0e4e-434c-a1e9-bd9a732f0589.webm)

---

<div class="post-metadata">

### Author: ![psychemedia](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/psychemedia/32/24_2.png) [@psychemedia](https://discourse.jupyter.org/u/psychemedia)
#### Post date: [July 31, 2023, 10:50am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/16 "2023-07-31T10:50:46Z")

</div>

@manics Ooh… a spawner for fully blown VMs? Interesting… Do you know if there’s a docker-compose spawner anywhere that lets you deploy a set of networked containers?

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [July 31, 2023, 11:17pm UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/17 "2023-07-31T23:17:49Z")

</div>

> [@psychemedia](#):
>
> Do you know if there’s a docker-compose spawner anywhere that lets you deploy a set of networked containers

I haven’t seen one, but it shouldn’t be too difficult to subclass DockerSpawner.  
Alternatively you could use [GitHub - manics/podmanclispawner: Spawner to use podman with JupyterHub](https://github.com/manics/podmanclispawner) as a framework, and replace the `podman` command line with `docker-compose`.

If you want something more offbeat… [GitHub - manics/jupyterhub-ansiblespawner: Spawn JupyterHub single user notebook servers using Ansible](https://github.com/manics/jupyterhub-ansiblespawner) allows you to spin up anything that Ansible can control, though I found it was a layuer of abstraction too far so haven’t used it for anything.

---

<div class="post-metadata">

### Author: ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)
#### Post date: [August 4, 2023, 3:24am UTC](https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964/18 "2023-08-04T03:24:45Z")

</div>

There was a recent blog post about this 🙂 [Desktop GIS software in the cloud with JupyterHub: A QGreenland workshop success story | by Matt Fisher | Aug, 2023 | Jupyter Blog](https://blog.jupyter.org/desktop-gis-software-in-the-cloud-with-jupyterhub-ddced297019a)
