diff --git a/server/src/uds/transports/RDP/scripts/macosx/direct.py b/server/src/uds/transports/RDP/scripts/macosx/direct.py index 5f399cafc..bc6aed7e3 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/direct.py +++ b/server/src/uds/transports/RDP/scripts/macosx/direct.py @@ -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('''

Microsoft Remote Desktop Connection not found

In order to connect to UDS RDP Sessions, you need to have at least one of the following:

diff --git a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py index 66541e730..3e39f1894 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py +++ b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py @@ -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('''

Microsoft Remote Desktop Connection not found

In order to connect to UDS RDP Sessions, you need to have at least one of the following:

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