Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c78ef81994 | ||
|
|
44b0bfae59 | ||
|
|
5db945dced | ||
|
|
34b4d010f5 |
2
dist/vdiclient.json
vendored
2
dist/vdiclient.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"upgrade_guid" : "46cbad92-353e-4b28-9bee-83950991dad8",
|
||||
"version" : "1.0.4",
|
||||
"version" : "1.0.6",
|
||||
"product_name" : "VDI Client",
|
||||
"manufacturer" : "Josh Patten",
|
||||
"name" : "VDI Client",
|
||||
|
||||
@@ -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
|
||||
|
||||
14
vdiclient.py
14
vdiclient.py
@@ -32,6 +32,7 @@ class G:
|
||||
totp = False
|
||||
imagefile = None
|
||||
kiosk = False
|
||||
fullscreen = True
|
||||
verify_ssl = True
|
||||
icon = None
|
||||
inidebug = False
|
||||
@@ -70,6 +71,9 @@ def loadconfig(config_location = None):
|
||||
config_location = f'{os.getenv("PROGRAMFILES")}\\VDIClient\\vdiclient.ini'
|
||||
if not os.path.exists(config_location):
|
||||
config_location = f'{os.getenv("PROGRAMFILES(x86)")}\\VDIClient\\vdiclient.ini'
|
||||
if not os.path.exists(config_location):
|
||||
# Last ditch effort
|
||||
config_location = 'C:\\Program Files\\VDIClient\\vdiclient.ini'
|
||||
if not os.path.exists(config_location):
|
||||
win_popup_button(f'Unable to read supplied configuration from any location!', 'OK')
|
||||
return False
|
||||
@@ -104,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:
|
||||
@@ -231,7 +237,11 @@ def vmaction(vmnode, vmid, vmtype):
|
||||
running = False
|
||||
i = 0
|
||||
while running == False and i < 30:
|
||||
jobstatus = G.proxmox.nodes(vmnode).tasks(jobid).status.get()
|
||||
try:
|
||||
jobstatus = G.proxmox.nodes(vmnode).tasks(jobid).status.get()
|
||||
except Exception:
|
||||
# We ran into a query issue here, going to skip this round and try again
|
||||
jobstatus = {}
|
||||
if 'exitstatus' in jobstatus:
|
||||
startpop.close()
|
||||
startpop = None
|
||||
@@ -274,7 +284,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)
|
||||
|
||||
Reference in New Issue
Block a user