mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Changed order so now on mac CorD is tried first
This commit is contained in:
parent
2e0972b71e
commit
a47df49ca8
@ -9,21 +9,18 @@ import urllib
|
||||
|
||||
from uds import tools # @UnresolvedImport
|
||||
|
||||
import six
|
||||
|
||||
theFile = '''{m.r.as_file}'''
|
||||
|
||||
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
||||
|
||||
|
||||
filename = tools.saveTempFile(theFile)
|
||||
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
||||
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
||||
|
||||
if os.path.isfile(msrdc):
|
||||
executable = msrdc
|
||||
elif os.path.isfile(cord):
|
||||
if os.path.isfile(cord):
|
||||
executable = cord
|
||||
elif os.path.isfile(msrdc):
|
||||
executable = msrdc
|
||||
else:
|
||||
executable = None
|
||||
|
||||
@ -39,6 +36,7 @@ def onExit():
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
if executable is None:
|
||||
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
||||
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
||||
|
@ -10,16 +10,14 @@ from uds.forward import forward # @UnresolvedImport
|
||||
|
||||
from uds import tools # @UnresolvedImport
|
||||
|
||||
import six
|
||||
|
||||
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
||||
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
||||
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
||||
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
||||
|
||||
if os.path.isfile(msrdc):
|
||||
executable = msrdc
|
||||
elif os.path.isfile(cord):
|
||||
if os.path.isfile(cord):
|
||||
executable = cord
|
||||
elif os.path.isfile(msrdc):
|
||||
executable = msrdc
|
||||
else:
|
||||
executable = None
|
||||
|
||||
@ -35,6 +33,7 @@ def onExit():
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
if executable is None:
|
||||
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
||||
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
||||
@ -48,7 +47,6 @@ if executable is None:
|
||||
|
||||
''')
|
||||
|
||||
|
||||
forwardThread, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', 3389, waitTime={m.tunWait}) # @UndefinedVariable
|
||||
|
||||
if forwardThread.status == 2:
|
||||
|
Loading…
Reference in New Issue
Block a user