GUACAMOLE-261: Implement Spice protocol support.
Well, here we are - ready to submit at least a draft pull request for implementation of Spice protocol support. It still has some work to be done - quite a bit of cleanup, I suspect, and a handful of things left to get working - but I'm ready to start getting some other eyes on it for review.
Nice! I'll start looking through this.
Cool, SPICE coming to guacamole!
I just tried it out, using docker. It basically works, but I'm having trouble with the keyboard layout. I'm using a german QWERTZ keyboard, so I set the layout in the SPICE configuration also to German QWERTZ. In the linux VM I'm viewing via guacamole -> spice I also used "setxkbmap de nodeadkeys".
When I type capital letters using shift, they work fine, but all other key combinations don't. So Shift +
Here is what xev shows on my laptop when I type Shift+1:
KeyPress event, serial 40, synthetic NO, window 0x8e00001,
root 0x7ab, subw 0x0, time 103910823, (-197,145), root:(3209,584),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8e00001,
root 0x7ab, subw 0x0, time 103911367, (-197,145), root:(3209,584),
state 0x11, keycode 10 (keysym 0x21, exclam), same_screen YES,
XLookupString gives 1 bytes: (21) "!"
XmbLookupString gives 1 bytes: (21) "!"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8e00001,
root 0x7ab, subw 0x0, time 103911649, (-197,145), root:(3209,584),
state 0x11, keycode 10 (keysym 0x21, exclam), same_screen YES,
XLookupString gives 1 bytes: (21) "!"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8e00001,
root 0x7ab, subw 0x0, time 103911932, (-197,145), root:(3209,584),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
And here is the xev output for Shift+1 from inside the guacamole spice vm:
KeyPress event, serial 37, synthetic NO, window 0x5000001,
root 0x529, subw 0x0, time 1355819, (225,399), root:(592,595),
state 0x2, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x5000001,
root 0x529, subw 0x0, time 1356183, (225,399), root:(592,595),
state 0x3, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x5000001,
root 0x529, subw 0x0, time 1356183, (225,399), root:(592,595),
state 0x2, keycode 10 (keysym 0x31, 1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x5000001,
root 0x529, subw 0x0, time 1356327, (225,399), root:(592,595),
state 0x2, keycode 10 (keysym 0x31, 1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
For some reason, a Shift_L release event is seen even if I didn't release the key. For the working capital letters, it looks like this:
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1833793, (164,-12), root:(1035,420),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1834395, (164,-12), root:(1035,420),
state 0x1, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1834395, (164,-12), root:(1035,420),
state 0x3, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1834395, (164,-12), root:(1035,420),
state 0x3, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1834395, (164,-12), root:(1035,420),
state 0x2, keycode 24 (keysym 0x51, Q), same_screen YES,
XLookupString gives 1 bytes: (51) "Q"
XmbLookupString gives 1 bytes: (51) "Q"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x529, subw 0x0, time 1834526, (164,-12), root:(1035,420),
state 0x2, keycode 24 (keysym 0x51, Q), same_screen YES,
XLookupString gives 1 bytes: (51) "Q"
XFilterEvent returns: False
Somehow a Caps_Lock gets involved there.
There are other inconsistencies, if it would help to show them in detail, let me know.
Thanks, @csarn - The keyboard mapping does indeed seem to be an area where there are likely to be some bugs. I reused the RDP protocol's keyboard mapping code due to the similarities in what the remote sides of both RDP and Spice require, but my guess is that there are some nuances of Spice that need to be factored in. In my testing I think most of the QWERTY keys from the US mapping work as expected; however, I do see that pressing "Shift" seems to activate "Caps Lock" on the remote side, and release it de-activates it - which is not what I'd call desirable or expected. I'll take a look at the xev output you sent, and the code, and see what I can figure out.
Hey guys, thanks for working on this! Could you please give me an estimate when this will be availabale in Gucamole release? Thanks
@raptaml No, there is no estimate on when this will be complete.