Hello,

I have a C++ app that outputs a framebuffer and want to expose that over
RDP.
I want to use Apache Guacamole as a client and have started using code from
this sample:
https://github.com/FreeRDP/FreeRDP/blob/master/server/Sample/sfreerdp.c

The Windows RDP client (mstsc.exe) works fine with it since it supports
RemoteFX, but with Guacamole it does not, as it doesn't support RemoteFX or
NSCodec (
https://github.com/FreeRDP/FreeRDP/blob/master/server/Sample/sfreerdp.c#L183
).

I assumed that guacamole expects data to be raw/uncompressed (?) so I
modified that code to instead do:

        const size_t len = rect.width * rect.height * 4;
        if (!Stream_EnsureRemainingCapacity(s, len))
            return FALSE;
        Stream_Write(s, myframebuffer.data(), len);
        cmd.bmp.codecID = 0;

Instead of rfx_compose_message or nsc_compose_message.
But, I see a black screen on Guacamole. I have set up guacd and can confirm
the connection goes through (and I can move the mouse on the browser), but
the screen is black, no matter what data I send.

Am I sending it right above?

I assume I sort of am, since if I use freerdp as a client with:
freerdp /bpp:32 /cert-ignore /v:localhost /log-level:TRACE +gfx-thin-client
I can connect just fine, though the screen is inverted and colors are wrong
(alpha channel is probably inverted with alpha).
So side question, how can I specify the format with FreeRDP's APIs when
using no encoder like I am?
With ie. RFX you just specify them in rfx_context_set_pixel_format.

guacd log:
https://pastebin.com/raw/Fi28hidq

FreeRDP log:
https://pastebin.com/raw/gKzLSCMT

guacamole.properties:
"guacd-port: 4823"
(the default of 4822 did not work for some reason)

user-mapping.xml:
<user-mapping>
    <!-- Per-user authentication and config information -->
    <authorize username="admin" password="">
        <protocol>rdp</protocol>
        <param name="hostname">localhost</param>
        <param name="port">3389</param>
        <param name="security">rdp</param>
        <param name="ignore-cert">true</param>
        <param name="disable-auth">true</param>
    </authorize>
</user-mapping>

Tomcat log:
(nothing of note)


I would appreciate any help, I can provide additional information if need
be.

Thank you,
Nick R.

_______________________________________________
FreeRDP-devel mailing list
FreeRDP-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to