danhale-git/runrdp

rdp/encrypt.go is not cross platform

danhale-git opened this issue · 5 comments

The following compile errors are thrown on Mac OS:

internal/rdp/encrypt.go:15:16: undefined: syscall.NewLazyDLL
internal/rdp/encrypt.go:16:16: undefined: syscall.NewLazyDLL

Workaround:
Compile separate RDP code for Windows and Mac. For Mac, instead of including the encrypted password in the RDP file, give the option of copying the password to the clipboard (probably don't do that by default).

If this results in completely separate rdp.Connect() code for Windows and Mac, consider running the RDP session in a cleaner way on Windows (i.e. not by saving and running a .rdp file)

Maybe try manipulating Mac OS Keychain to achieve the current behaviour on Mac, before resorting to the above workaround.
https://stackoverflow.com/questions/48713606/how-to-create-rdp-file-on-mac-os-that-allows-auto-login

You need the admin password to do this step.

This could be a problem. Ideally we don't want to be entering the admin password every time we connect. If this is the case, consider possible workarounds - perhaps giving mac users the option of generating MS RDP entries for all configured hosts, and updating them (assuming this would be one password entry each time all hosts are updated). For the vast majority of cases passwords change rarely if ever, so this would probably be suitable.

Having a dedicated Microsoft Remote Desktop client entry for runrdp is actually a fine solution for Mac, especially as it solves the messy password problem. Simply run runrdp then go into the MS RDP client and double click the entry.