[Spice-devel] Adding SPICE support to Guacamole - spice-glib
Nick Couchman
vnick at apache.org
Fri Jan 8 03:22:54 UTC 2021
On Thu, Jan 7, 2021 at 3:41 PM Nick Couchman <vnick at apache.org> wrote:
> On Thu, Jan 7, 2021 at 3:21 PM Marc-André Lureau <
> marcandre.lureau at gmail.com> wrote:
>
>> Hi
>>
>> On Fri, Jan 8, 2021 at 12:07 AM Nick Couchman <vnick at apache.org> wrote:
>>
>>> Hey, everyone,
>>> I'm a contributor to the Guacamole project, and am currently working on
>>> adding support for the SPICE protocol to Guacamole. If you haven't heard of
>>> Guacamole, it is a protocol and associated software components for making
>>> various remote desktop interfaces available via native HTML5 in browsers. I
>>> realize that there is already a spice-html5 client, but, for various
>>> reasons, we'd like to add the SPICE support to Guacamole, as well.
>>>
>>> Within Guacamole, the clients for the individual protocols are
>>> implemented in a daemon - guacd - that is written in C. It accesses the
>>> various remote desktop protocols that we support (VNC, RDP, SSH, and
>>> Telnet, today) and does the translation to the Guacamole protocol. So, I am
>>> attempting to write the SPICE client for this using the spice-glib library.
>>>
>>> I'm running into an issue with the code I've written thus far. I've
>>> followed API documentation and some code examples, and I have it to where
>>> I'm configuring all of the required pieces - hostname/IP, tls-port,
>>> password, etc. I've set up the handlers for the session (channel-event) and
>>> for the channels. When I attempt to connect, the SPICE client starts up,
>>> the session starts/connects, and I see the main channel get created, but
>>> the connection never progresses after that. As far as I can tell, it
>>> doesn't even try any sort of connection to the SPICE server - I don't see
>>> any network traffic going to the SPICE server, and it never progresses past
>>> that point. I'm not seeing any errors - nothing that indicates it's tried
>>> and failed, or is expecting additional input, or anything like that.
>>>
>>> I'm happy to share code if anyone is interested in looking at what I've
>>> done so far, or if anyone has any generic hints as to what I might check or
>>> resources that are helpful in writing a C-based client for SPICE, I'd
>>> greatly appreciate the insight and help. I'm sure there's something
>>> reasonably simple that I'm not doing, or doing out of order, but I'm a bit
>>> stumped at the moment.
>>>
>>
>> Spice uses multiple connections which are called channels for the various
>> streams. You need to get and listen for available channels on the
>> SpiceSession.
>>
>>
> Thanks for the quick response, Marc-Andre. Yes, I've got a handler that is
> supposed to listen for each of the channels to be created and then add the
> signal handlers for each of those channels (and connect to them, where
> applicable). The main channel is the only one that I ever see get created,
> after running "spice_session_connect(session)" on the SpiceSession that
> gets started. I never see the Display, Cursor, Input, Playback, Record, or
> WebDav channels get created.
>
>
Just to add to this - I set the "SPICE_DEBUG" environment variable to get a
little more debugging, and these are the debug messages I get:
(process:129359): GSpice-DEBUG: 22:02:18.289: spice-session.c:289 New
session (compiled from package spice-gtk 0.35)
(process:129359): GSpice-DEBUG: 22:02:18.289: spice-session.c:293 Supported
channels: main, display, inputs, cursor, playback, record, smartcard,
usbredir
(process:129359): GSpice-DEBUG: 22:02:18.291: spice-session.c:1774 no
migration in progress
(process:129359): GSpice-DEBUG: 22:02:18.291: spice-channel.c:141 main-1:0:
spice_channel_constructed
(process:129359): GSpice-DEBUG: 22:02:18.291: spice-session.c:2294
main-1:0: new main channel, switching
And that's the last of the debug I get from SPICE - nothing more after
that. I'm wading through the spice-gtk code trying to figure out the code
flow there to see where it might be hanging/stopping, and what it's waiting
for.
-Nick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20210107/b4c1fb08/attachment-0001.htm>
More information about the Spice-devel
mailing list