From 5db945dced761889b66579a6428b585946d9f7e8 Mon Sep 17 00:00:00 2001 From: jpattWPC Date: Mon, 11 Jul 2022 14:07:32 -0500 Subject: [PATCH] Add fullscreen toggle --- dist/vdiclient.json | 2 +- vdiclient.ini.example | 3 +++ vdiclient.py | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/vdiclient.json b/dist/vdiclient.json index dca8c43..2083f71 100644 --- a/dist/vdiclient.json +++ b/dist/vdiclient.json @@ -1,6 +1,6 @@ { "upgrade_guid" : "46cbad92-353e-4b28-9bee-83950991dad8", - "version" : "1.0.4", + "version" : "1.0.5", "product_name" : "VDI Client", "manufacturer" : "Josh Patten", "name" : "VDI Client", diff --git a/vdiclient.ini.example b/vdiclient.ini.example index 7617c0d..b22817c 100644 --- a/vdiclient.ini.example +++ b/vdiclient.ini.example @@ -9,9 +9,12 @@ icon = vdiicon.ico logo = vdiclient.png # Enable Kiosk mode, which does not allow the user to close anything kiosk = False +# Enable/Disable Fullscreen mode (not applicable in Kiosk mode) +fullscreen = True # Enable displaying SPICE ini file before opening virt-viewer inidebug = False + [Authentication] # This is the authentication backend that will be used to authenticate auth_backend = pve diff --git a/vdiclient.py b/vdiclient.py index 819f826..13daaae 100644 --- a/vdiclient.py +++ b/vdiclient.py @@ -32,6 +32,7 @@ class G: totp = False imagefile = None kiosk = False + fullscreen = True verify_ssl = True icon = None inidebug = False @@ -107,6 +108,8 @@ def loadconfig(config_location = None): G.imagefile = config['General']['logo'] if 'kiosk' in config['General']: G.kiosk = config['General'].getboolean('kiosk') + if 'fullscreen' in config['General']: + G.fullscreen = config['General'].getboolean('fullscreen') if 'inidebug' in config['General']: G.inidebug = config['General'].getboolean('inidebug') if not 'Authentication' in config: @@ -277,7 +280,7 @@ def vmaction(vmnode, vmid, vmtype): pcmd.append('--kiosk') pcmd.append('--kiosk-quit') pcmd.append('on-disconnect') - else: + elif G.fullscreen: pcmd.append('--full-screen') pcmd.append('-') #We need it to listen on stdin process = subprocess.Popen(pcmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)