From cf02bd815e5cf5294fbb32738e901f1b6fa4fcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Tue, 9 May 2023 15:43:45 -0400 Subject: [PATCH] Let user defines its own xstartup User can override the default provided xstartup by providing their own in the standard location ~/.vnc/xstartup. --- jupyter_remote_desktop_proxy/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jupyter_remote_desktop_proxy/__init__.py b/jupyter_remote_desktop_proxy/__init__.py index 5d125574..30637a2f 100644 --- a/jupyter_remote_desktop_proxy/__init__.py +++ b/jupyter_remote_desktop_proxy/__init__.py @@ -31,19 +31,21 @@ def setup_desktop(): vnc_args = [vncserver] socket_args = [] + if not os.path.exists(os.path.expand('~/.vnc/xstartup')): + vnc_args.extend(['-xstartup', os.path.join(HERE, 'share/xstartup')]) + vnc_command = shlex.join( vnc_args + [ - '-verbose', - '-xstartup', - os.path.join(HERE, 'share/xstartup'), '-geometry', '1680x1050', + '-verbose', '-SecurityTypes', 'None', '-fg', ] ) + return { 'command': [ 'websockify',