On Thu, Jan 28, 2021 at 05:35:04PM +0000, Daniel P. Berrangé wrote: > On Thu, Jan 28, 2021 at 06:12:24PM +0100, Gerd Hoffmann wrote: > > Hi folks, > > > > I'm looking for a good way to implement cut+paste support for vnc. > > > > The vnc core protocol has support for text/plain cut+paste, and there > > is an extension adding support for other formats. That'll cover one > > part of the problem, exchanging cut+paste data between vnc client and > > qemu vnc server. > > NB the VNC cut+paste impl is technically undefined for non-7-bit ascii > data. In reality though I'd assume most servers/clients and up sending > UTF8.
rfbspec says it is latin1 for classic cut_text messages and utf-8 with the extension. In reality I've seen tigervnc send utf-8 even in classic cut_text messages. Given running in utf-8 locale is sort-of standard these days I'm not surprised. > I've never looked at the spice-guest-agent code, but I wonder if there > is any scope for re-using it with VNC, or is it too closely tangled > up with SPICE ? The advantage of reuse is that all existing guest > OS with spice-guest-agent installed will "just work". Neat idea. Need to check. spice tunnels alot of stuff through the agent channel, but IIRC there is some kind of feature negotiation so maybe it isn't that hard to cherry-pick cut+paste and say "not supported" for everything else. > The QEMU guest agent is a single system level agent. IIUC, with SPICE > you have a single system level agent, and then zero or more session > level agents - one per desktop login basically. Ok, easy multi-session support is one advantage of the proxy model. take care, Gerd