[Spice-devel] How to send a custom resolution message to windows/linux guest vdagent

Victor Toso victortoso at redhat.com
Thu Mar 2 09:18:31 UTC 2017


Oi Thiago,

On Thu, Mar 02, 2017 at 03:58:34AM -0300, Thiago Nascimento Araujo wrote:
> Hello,
>
> Is there a way to send a spice message, connect to pipe, or any other
> method to contact vdservice/vdagent to create/simulate a resize to an
> arbitrary resolution or full screen effect caused by remote-viewer?

I would start enabling the debug messages, it should give you good hints
on how things work. For instance, with spicy --spice-debug:

/* Resizing the widget */
GSpice-DEBUG: spice-widget.c:1228 recalc geom monitor: 0:0, guest +0+0:640x480, window 714x522, zoom 1
GSpice-DEBUG: spice-widget.c:1228 recalc geom monitor: 0:0, guest +0+0:640x480, window 715x524, zoom 1
GSpice-DEBUG: spice-widget.c:1228 recalc geom monitor: 0:0, guest +0+0:640x480, window 716x525, zoom 1
(...)
GSpice-DEBUG: spice-widget.c:1810 focus_in_event
GSpice-DEBUG: spice-widget.c:1462 release_keys
GSpice-DEBUG: spice-gtk-session.c:203 inputs-3:0: client_modifiers:0x2, guest_modifiers:0x2
/* Sending new monitors config! */
GSpice-DEBUG: channel-main.c:1118 main-1:0: sending new monitors config to guest
GSpice-DEBUG: channel-main.c:1135 main-1:0: monitor #0: 716x525+0+0 @ 32 bpp
GSpice-DEBUG: channel-main.c:1070 #0 +0+0-716x525
GSpice-DEBUG: channel-display.c:1820 display-2:0: received empty monitor config
GSpice-DEBUG: channel-display.c:1820 display-2:0: received empty monitor config
GSpice-DEBUG: channel-display.c:1820 display-2:0: received empty monitor config
GSpice-DEBUG: channel-display.c:1820 display-2:0: received empty monitor config
/* Done with the interesting part */

Very likely it should be possible to improve the spicy testing tool to
have something that could you help you test it, like some text fields to
set display X width X height values.

> Any other ways I can connect to the named pipes (windows guests or
> linux guests) and watch/debug/learn. I cant find or connect to the
> windows guest named pipe and I got connection refused trying to socat
> to a port in linux guest.

You will then need to hexdump the data and start trying to get the
meaning out of it. I think it is more interesting to include more debug
in the agents if you want to know more specific details about something
that is going on. Or even gdb -p $PID.

> I really need some guidance to fully understand how arbitrary
> resolutions are created using win/lnx/spice api.
>
> Thanks in advance.

Feel free to ask your doubts here as well. We would gladly take any
patches that improve the documentation/testing tools too :)

        toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170302/6457e872/attachment.sig>


More information about the Spice-devel mailing list