Add fullscreen toggle

This commit is contained in:
jpattWPC 2022-07-11 14:07:32 -05:00
parent 34b4d010f5
commit 5db945dced
3 changed files with 8 additions and 2 deletions

2
dist/vdiclient.json vendored
View File

@ -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",

View File

@ -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

View File

@ -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)