vernacular-vnc icon indicating copy to clipboard operation
vernacular-vnc copied to clipboard

Added support for utf8 clipboard based on TigerVNC/TightVNC extension

Open egorksv opened this issue 3 years ago • 3 comments

egorksv avatar Aug 21 '22 07:08 egorksv

Hi @shinyhut - I'm a bit confused with GitHub UI, as I'm not using it much. I could not find an option to delete the previous PR (#27), would greatly appreciate it you could close that one.

egorksv avatar Aug 21 '22 07:08 egorksv

Hi @egorksv, did you know the extended clipboard pseudo encoding is pretty well documented at https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#extended-clipboard-pseudo-encoding? It looks to me as if we're missing the part where the client should send an extended ClientCutText caps message indicating we only support the provide operation, text format and our maximum text length (make this configurable).

I suspect not sending that message is why you're having to handle error cases where the server sends unsupported message types and messages that are too long (it defaults to "text, rtf, html, request, notify and provide and a maximum size of 20 MiB").

shinyhut avatar Aug 28 '22 13:08 shinyhut

Hi Paul, that's awesome find! Somehow missed it in the crunch of our project development.

The code here is based on UltraVNC/TigerVNC C++ implementation (https://github.com/TigerVNC/tigervnc/pull/834/files#diff-3708dc882e492835643384e30efa3d98c2b9296612fc705bd179ba2a6f9a74e9) as TigerVNC is what we're using on the server side, with similar error cases / invalid message types.

I'll need to confirm whether I'll be allocated additional project time to add client caps feature - however, additional error handling can never be too bad.

egorksv avatar Aug 31 '22 08:08 egorksv