Skip to content
This repository

Unable to connect to VirtualBox RDP server #242

Closed
helgef opened this Issue December 01, 2011 · 11 comments

4 participants

helgef Marc-André Moreau Anthony jacob019
helgef

Tested with commit a0a25a6

VirtualBox implements its own RDP server displaying its guest OS. FreeRDP does not work with this server. MS Remote Desktop client (for mac) works fine.

Show connected, but never displays:

Helges-MacBook-Air:X11 helge$ ./xfreerdp 192.168.1.150
Warning xf_GetWindowProperty (104): Property 294 does not exist
connected to 192.168.1.150:3389

helgef

Does not work under 0.8 either - However 0.8 gives a more verbose output, might help:

Helges-MacBook-Air:X11 helge$ ./xfreerdp 192.168.1.150
keyboard_layout: 0x409
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
Standard RDP encryption negotiated
dyld: lazy symbol binding failed: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

Trace/BPT trap: 5
Helges-MacBook-Air:X11 helge$

helgef helgef closed this December 01, 2011
helgef helgef reopened this December 01, 2011
Anthony
Collaborator

VRDP doesnt seem to like freerdp's rdp_client_connect_demand_active() sequence; VRDP doesnt reply after that.

Marc-André Moreau
Owner

@atong-tcs I came to the same conclusion. I tried figuring it out, the ShareId seems to be correct. I don't know what the VRDP doesn't like in our client Confirm Active PDU.

Marc-André Moreau
Owner

I've asked on #vbox and #vbox-dev, I couldn't get in touch with someone working on VRDP yet. I compiled VirtualBox myself but then I realized that VRDP was closed-source, so I wasted my time doing it. I now have opened a ticket, for what it's worth: https://www.virtualbox.org/ticket/10017

While we're at it, I was discussing with some people on IRC, and since VRDP is provided as an "extension pack" it would be totally possible for us to write a replacement RDP server for VirtualBox that could be used instead of the closed-source VRDP component.

Marc-André Moreau
Owner

I enabled TLS security and got a little bit further. I think there might be a race condition somewhere in the activation sequence. If I add a sleep right after the send font list pdu (last pdu to be sent for activation) it will go further, but then I'm getting a realloc error on the first bitmap update.

Marc-André Moreau
Owner

after deeper investigation with atong on IRC, we fixed a couple of capabilities bugs and we finally found out that the input callbacks were registered prior to the capabilities exchange. This means that fastpath callbacks were registered no matter if you disabled fastpath or not. This bug affected VRDP which does not support fastpath, but it also affected XRDP. Now both VRDP and XRDP work! :D Closing this issue now.

Marc-André Moreau awakecoding closed this December 20, 2011
Marc-André Moreau awakecoding reopened this December 20, 2011
Marc-André Moreau
Owner

oops, I was a bit too fast. VRDP will work with --sec tls for now, but there is still a separate bug with --sec rdp. the bug with --sec rdp seems to be related to the capabilities exchange.

jacob019

not working for me as of to2a9d9c681d (most recent master), even with --sec tls

jacob@office:~# xfreerdp --sec tls localhost
connected to localhost:3389
Error: protocol security negotiation failure

xfreerdp --sec rdp localhost
connected to localhost:3389
(just hangs here, no window)

Marc-André Moreau
Owner

@jacob019 if --sec tls fails to negotiate TLS, it's probably because your virtual machine isn't configured properly for it.

jacob019

got it, thanks! No need to specify "--sec tls". Once it is enabled in virtualbox everything just works.

I suggest for the 1.0 release to clearly state in the documentation that freerdp can only connect to virtualbox if TLS security is enabled in virtualbox. Perhaps with a link: http://www.virtualbox.org/manual/ch07.html#vrde-crypt

Marc-André Moreau
Owner

this one was a real pain to debug, but I finally found the bug which caused the VRDP connectivity issue. The method encoding the share control header was using the wrong length, which broke VRDP. For some reason other servers didn't mind have a length 12 bytes too long, but it was a bug on our side anyway. Now it is fixed, and both --sec rdp and --sec tls should work out of the box :)

Marc-André Moreau awakecoding closed this January 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.