Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any remote desktop client OSX #2231

Open
Toby-Broom opened this issue Nov 12, 2017 · 10 comments
Open

Allow any remote desktop client OSX #2231

Toby-Broom opened this issue Nov 12, 2017 · 10 comments

Comments

@Toby-Broom
Copy link

On my Mac, when I click "Show VM Console" then it asks me to download CoRD, however in my case I have the the microsoft remote desktop application. Could it be genericized so that any RDP capable program can be used?

@CharlieFenton
Copy link
Contributor

From an email I sent in January 2012:

I tried MS RDC first, and spent a fair amount of time trying to use it. It is very strongly oriented to being used for connecting to MS Windows. I found it worked very poorly and unreliably trying to get it to connect automatically to the VM, and displayed warnings because it assumed it would be connecting to a Windows system.

I ended up choosing CoRD because it is free open source software, licensed under the GPLv2 license. It is based off the Unix program rdesktop, which is also licensed under the GPL.

@chrstphrchvz
Copy link

I think this is important because CoRD is no longer maintained, and even suggests using Microsoft's RDP client instead (cf. https://github.com/dorianj/CoRD/blob/master/README.md):

Deprecation Notice

This project is no longer being maintained as of August 16, 2015.
Please consider using the free official Remote Desktop Client from Microsoft, available on the Mac App Store.

@chrstphrchvz
Copy link

Cf. https://apple.stackexchange.com/a/199208https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-uri: Microsoft's Remote Desktop Client for Mac (both versions 8.0.43 and 10.0.1) register their ability to open rdp:// URLs, so using e.g. open rdp://full%20address=s:localhost:3389 seems sufficient to connect. I'm not aware if any open-source clients register rdp:// URLs similarly, though; I don't mean to force anyone onto proprietary tools.

I haven't contributed code to BOINC before, but I might be able to fiddle with the relevant code of MainDocument.cpp and have a patch within the next week or so.

@CharlieFenton
Copy link
Contributor

CharlieFenton commented Dec 11, 2017 via email

@chrstphrchvz
Copy link

Also, CoRD does support rdp:// URI/URLs, but only using e.g. open rdp://localhost:3389, and not in the "query-string" format Microsoft's client expects. I'm not sure which is the more authoritative or common convention (i.e. what other clients such as Remmina or rdesktop support).

@CharlieFenton
Copy link
Contributor

I ran some tests with LHC@home and can successfully show the VM Console using Microsoft Remote Desktop. But there are a couple of issues which I feel make MRD unacceptable for this purpose:
[1] Whereas CoRD displays the VM Console in a 1024X665 window, MRD 8.0.27325 uses the largest window that is not full screen; in other words, it leaves only room for the menubar and the window frame, covering everything else on that monitor including BOINC Manager.
[2] MRD displays an alert saying

The identity of the Remote PC cannot be verified. ... Do you want to connect anyway? [Connect Always] [Do not connect] [Connect once]

If you select Connect Always the message is not repeated for future connections to that port, but appears again if a different port is referenced.

These issues occurred even when I tried all the seemingly relevant options in the open command:
"rdp://full%20address=s:localhost:58713&connect%20to%20console=i:0&authentication%20level=i:0&prompt%20for%20credentials%20on%20client=i:0&desktopheight=i:662&destopwidth=i:1024&screen%20mode%20id=i:1"
You can test this yourself as follows:

  • Click "Show VM Console" for a VirtualBox task
  • Show CoRD's Server Drawer (View menu)
  • Note the URL of the active session (127.0.0.1 is the same as localhost)
  • Quit CoRD
  • Enter the open rdp:// string in Terminal, substituting the URL you got from CoRD

Please let me know if you find a solution to these issues.

@CharlieFenton
Copy link
Contributor

I have now tested with Microsoft Remote Desktop 10.0.823 on OS 10.13.2, in addition to the problems with MRD 8.0, MRD 10.0 also displays an alert asking for a user name and password.

This can be eliminated by adding a dummy username and password to the RDP "query-string" like this:
"rdp://full%20address=s:localhost:53608&connect%20to%20console=i:0&authentication%20level=i:0&prompt%20for%20credentials%20on%20client=i:0&desktopheight=i:662&destopwidth=i:1024&screen%20mode%20id=i:1&username=s:none:none"
If you have both CoRD and MRD installed, entering just open with the rdp:// string might open CoRD instead of MRD. The following AppleScript will always open MRD:

tell application "Microsoft Remote Desktop"
	activate
	open location "rdp://full%20address=s:localhost:53608&connect%20to%20console=i:0&authentication%20level=i:0&prompt%20for%20credentials%20on%20client=i:0&desktopheight=i:662&destopwidth=i:1024&screen%20mode%20id=i:1&username=s:Charlie:none"
end tell

@chrstphrchvz
Copy link

I have not looked into this issue much more, but I would say that 1024x665 resolution used by CoRD is a red herring. Although I saw CoRD similarly use 1024x640 when I tried it, the VM was actually using 720x400.

The resolution issue is not specific to the MS RDP client on Mac. I wonder if RDP clients are even capable of knowing what resolution the VM is set to. Unlike connecting to a session on a physical screen over e.g. VNC, and therefore the server dictating the resolution used by the client, I would think the intended use case of RDP (controlling a session not tied to a physical screen) is for the client to dictate the resolution. VirtualBox supports the RDP client resizing the VM's resolution, but only when guest additions are active.

So BOINC Manager might have to use something like VBoxManage to query what the resolution is (assuming it has a subcommand with this information) in order to tell the RDP client what resolution to use. Or a specific/maximum resolution is agreed on ahead of time by VM workunits and hardcoded in BOINC Manager.

@chrstphrchvz
Copy link

So BOINC Manager might have to use something like VBoxManage to query what the resolution is (assuming it has a subcommand with this information)

Found it: VBoxManage showvminfo --machinereadable, then look for VideoMode="X,Y,colordepth". Example:

# Video mode during BIOS splash screen
$ VBoxManage showvminfo --machinereadable test | grep "^VideoMode="
VideoMode="640,480,32"@0,0 1

# Video mode during 80x25 text mode
$ VBoxManage showvminfo --machinereadable test | grep "^VideoMode="
VideoMode="720,400,0"@0,0 1

@AenBleidd AenBleidd added this to Backlog in Client and Manager via automation Oct 30, 2019
@AenBleidd AenBleidd added this to To do in BOINC Client/Manager via automation Oct 30, 2019
@AenBleidd AenBleidd added this to the Client/Manager 8.0 milestone Oct 30, 2019
@RichardHaselgrove
Copy link
Contributor

This issue is raised again in https://boinc.berkeley.edu/forum_thread.php?id=14173

Given the recent changes in OSX to accommodate Apple silicon, should we promote this up the priority order?

@AenBleidd AenBleidd removed this from Backlog in Other Aug 14, 2023
@AenBleidd AenBleidd removed this from Backlog in Client and Manager Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

6 participants