# 3D Slicer customized application with display and GPU on different hosts

**URL:** <https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434>\
**Category:** Support\
**Created:** [July 21, 2022, 5:19pm UTC](https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434 "2022-07-21T17:19:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee\_Newberg](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lee_newberg/32/7615_2.png) [@Lee\_Newberg](https://discourse.slicer.org/u/Lee_Newberg)\
**Post date:** [July 21, 2022, 5:19pm UTC](https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434/1 "2022-07-21T17:19:54Z")

</div>

Others have written a very nice lung-air app customization of 3D Slicer that makes use of a GPU. I have a display-less Ubuntu 20.04 workstation with a good GPU and an Ubuntu 20.04 laptop with a display but a poor GPU. I wish to have the computations done on the workstation, but have the interface showing up on my laptop display. What’s the best practice for this for Ubuntu systems?

I have tried using an xterm on my laptop, ssh’ing to the workstation, and launching the application – and that does give me the display on my laptop via X11 forwarding, but the graphics are slow. I’ve searched the web and found some postings about using a “software renderer” but that appears to be for Windows, not Ubuntu. (Aside: I find those instructions to be confusing: which is the “renderer” computer, the one with the GPU or the one with the display, where I would follow the recommended steps?)

What’s the best practice for this? Thanks!

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/83011_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 21, 2022, 5:32pm UTC](https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434/2 "2022-07-21T17:32:01Z")

</div>

This can be done quite readily (and freely) using VirtualGL and TurboVNC:

1. On your headless (or displayless) Ubuntu 20.04 with GPU, you [will install VirtualGL](https://virtualgl.org/) (this assumes you already have the GPU drivers installed on the Ubuntu host, if not you should start with that)
2. After install vgl, run /opt/VirtualGL/bin/vglserver\_config, and follow the instructions.
3. [Install TurboVNC](https://sourceforge.net/projects/turbovnc/files/) on the same Ubuntu on host
4. Install TurboVNC on your laptop.

Then open the TurboVNC client on your laptop and connect to your Ubuntu host as if you are using a ssh session (e.g., user@your.ubuntu.server). You would authenticate via the ssh password you normally use connecting to that host. After that you would see a unity desktop, and from there launch your Slicer application via command `vglrun`. So if your slicer path is something like $HOME/Downloads/Slicer/Slicer, you would do  
`vglrun $HOME/Downloads/Slicer/Slicer`

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 21, 2022, 5:34pm UTC](https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434/3 "2022-07-21T17:34:06Z")

</div>

Hi @Lee_Newberg -

I have good luck with x11vnc/noVNC and then tunneling the vnc connection through ssh.  
It’s the method [describe here](https://learn.canceridc.dev/cookbook/virtual-machines/idc-desktop). The scripts to configure a vanilla ubuntu machine are [here](https://github.com/pieper/SlicerMachines/tree/main/scripts).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 21, 2022, 5:55pm UTC](https://discourse.slicer.org/t/3d-slicer-customized-application-with-display-and-gpu-on-different-hosts/24434/4 "2022-07-21T17:55:54Z")

</div>

If your GPU computer needs to serve multiple users or you want to maximize the responsiveness of the GUI then you may consider running Slicer locally (on your laptop) and setting up a MONAILabel server (or some generic Python REST API server using [FastAPI, Flask, etc.](https://rapidapi.com/blog/best-python-api-frameworks/)) to perform the tasks that require GPU.
