From ef6637bb11bcb857905ffdacbe1e2ab7d72aaaa0 Mon Sep 17 00:00:00 2001
From: guiwitz <guiwitz@users.noreply.github.com>
Date: Thu, 17 Mar 2022 10:08:08 +0100
Subject: [PATCH] napari usable for remote desktop

---
 09-Advanced.ipynb | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/09-Advanced.ipynb b/09-Advanced.ipynb
index 055f6ef..6574b63 100644
--- a/09-Advanced.ipynb
+++ b/09-Advanced.ipynb
@@ -396,10 +396,29 @@
   },
   {
    "cell_type": "markdown",
-   "id": "8629df52-472f-4667-9781-42937efb35d4",
+   "id": "61018e39-bbd9-4524-933d-b5a28f3ab3f8",
    "metadata": {},
    "source": [
-    "The first thing we have to do is to create the ```viewer```. Once we have a viewer, we can interact with it both via the interface and programmatically via methods attached to it. Below we see the napari viewer: an area on the right where images are viewed, and an interactive menu on the left."
+    "The first thing we have to do is to create the ```viewer```. Once we have a viewer, we can interact with it both via the interface and programmatically via methods attached to it. **Only on renku, you first have to create a desktop (Launcher -> VNC) and then run the following cell for napari to work**:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "a85beb92-d263-4d84-93f9-b36a4d7c28af",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "os.environ['DISPLAY'] = ':1.0'"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "67d8c75f-e6ee-4b26-9665-c247be4bdae3",
+   "metadata": {},
+   "source": [
+    "Now we create the viewer:"
    ]
   },
   {
@@ -412,6 +431,14 @@
     "viewer = napari.Viewer()"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "d34f454b-7ed4-44d8-8077-251e7914b088",
+   "metadata": {},
+   "source": [
+    "Below we see the napari viewer: an area on the right where images are viewed, and an interactive menu on the left."
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": 16,
-- 
GitLab