Re: VNC clipboard support

2023-04-30 Thread Philipp Hahn
Hello, Am 29.04.23 um 17:29 schrieb octavef...@outlook.fr: I'm trying to use the copy/paste with VNC. I'm launching qemu with: $ qemu-system-x86_64 -hda debiandisk.img vnc :1 I'm using tightvncviewer which has support for copy/paste. I try to copy text between guest and host. It doesn't wor

VNC clipboard support

2023-04-29 Thread octavef...@outlook.fr
Hello, I'm trying to use the copy/paste with VNC. I'm launching qemu with: $ qemu-system-x86_64 -hda debiandisk.img vnc :1 I'm using tightvncviewer which has support for copy/paste. I try to copy text between guest and host. It doesn't work. Neither from host to guest or guest to host. As fa

Re: [PULL 09/11] ui/vnc: clipboard support

2021-12-20 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 15:51, Gerd Hoffmann wrote: This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20210

[PULL 09/11] ui/vnc: clipboard support

2021-05-21 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20210519053940.1888907-1-kra...@redhat.com Mes

[PATCH v6 7/9] ui/vnc: clipboard support

2021-05-18 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- ui/vnc.h | 24 ui/vnc-clipboard.c | 3

[PATCH v5 7/9] ui/vnc: clipboard support

2021-05-04 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- ui/vnc.h | 24 ui/vnc-clipboard.c | 3

Re: [PATCH v4 7/9] ui/vnc: clipboard support

2021-04-27 Thread Marc-André Lureau
On Fri, Apr 23, 2021 at 12:34 PM Gerd Hoffmann wrote: > This patch adds support for cut+paste to the qemu vnc server, which > allows the vnc client exchange clipbaord data with qemu and other peers > like the qemu vdagent implementation. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Marc-Andr

[PATCH v4 7/9] ui/vnc: clipboard support

2021-04-23 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 24 ui/vnc-clipboard.c | 323 +

[PATCH v3 5/7] ui/vnc: clipboard support

2021-03-26 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 24 ui/vnc-clipboard.c | 323 +

[PATCH v2 5/7] ui/vnc: clipboard support

2021-03-18 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 24 ui/vnc-clipboard.c | 323 +

Re: [PATCH 5/7] ui/vnc: clipboard support

2021-03-04 Thread Gerd Hoffmann
Hi, > > I don't see the > > agent doing the same (I might be missing something). > > Hmm, ok. Guess I should better be prepared to receive messages larger > than VD_AGENT_MAX_DATA_SIZE ... Confirmed. Cut+paste large text blocks in the guest -> hangs qemu vdagent implementation, because the m

Re: [PATCH 5/7] ui/vnc: clipboard support

2021-03-04 Thread Gerd Hoffmann
On Wed, Mar 03, 2021 at 06:27:27PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Mar 3, 2021 at 4:13 PM Gerd Hoffmann wrote: > > > Hi, > > > > > > +case Z_BUF_ERROR: > > > > +out_len <<= 1; > > > > +if (out_len > (1 << 20)) { > > > > > > > > > > 1Mb isn't tha

Re: [PATCH 5/7] ui/vnc: clipboard support

2021-03-03 Thread Marc-André Lureau
Hi On Wed, Mar 3, 2021 at 4:13 PM Gerd Hoffmann wrote: > Hi, > > > > +case Z_BUF_ERROR: > > > +out_len <<= 1; > > > +if (out_len > (1 << 20)) { > > > > > > > 1Mb isn't that much, is it? Well, since it handles only text for now it's > > probably enough. Would it

Re: [PATCH 5/7] ui/vnc: clipboard support

2021-03-03 Thread Gerd Hoffmann
Hi, > > +case Z_BUF_ERROR: > > +out_len <<= 1; > > +if (out_len > (1 << 20)) { > > > > 1Mb isn't that much, is it? Well, since it handles only text for now it's > probably enough. Would it make sense to make this a #define for clarity ? Yep. While talking about

Re: [PATCH 5/7] ui/vnc: clipboard support

2021-02-25 Thread Marc-André Lureau
On Fri, Feb 19, 2021 at 5:25 PM Gerd Hoffmann wrote: > This patch adds support for cut+paste to the qemu vnc server, which > allows the vnc client exchange clipbaord data with qemu and other peers > clipboard like the qemu vdagent implementation. > > Signed-off-by: Gerd Hoffmann > --- > ui/vn

[PATCH 5/7] ui/vnc: clipboard support

2021-02-19 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 24 ui/vnc-clipboard.c | 326 +

Re: vnc clipboard support

2021-02-03 Thread Gerd Hoffmann
Hi, > > Well, spice isn't that much better. Has a short, fixed list too: > > > > VD_AGENT_CLIPBOARD_UTF8_TEXT > There has been some attempts to support generic mime types in Spice clipboard: > https://lists.freedesktop.org/archives/spice-devel/2018-May/043782.html > > (If I am not mistaken, I

Re: vnc clipboard support

2021-02-02 Thread Marc-André Lureau
Hi On Tue, Feb 2, 2021 at 9:18 PM Gerd Hoffmann wrote: > > On Tue, Feb 02, 2021 at 02:35:34PM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > The VNC protocol is way too crude. It is limited to transferring > > > plain text, and provides no way to specify or negotiate a character > > > set. The R

Re: vnc clipboard support

2021-02-02 Thread Gerd Hoffmann
On Tue, Feb 02, 2021 at 02:35:34PM +0100, Gerd Hoffmann wrote: > Hi, > > > The VNC protocol is way too crude. It is limited to transferring > > plain text, and provides no way to specify or negotiate a character > > set. The RFB spec says apps should use latin-1. In reality few, if any, > > impl

Re: vnc clipboard support

2021-02-02 Thread Gerd Hoffmann
Hi, > The VNC protocol is way too crude. It is limited to transferring > plain text, and provides no way to specify or negotiate a character > set. The RFB spec says apps should use latin-1. In reality few, if any, > impls do charset conversion so most Linux impls will be sending UTF8 > while Wi

Re: vnc clipboard support

2021-02-02 Thread Daniel P . Berrangé
On Tue, Feb 02, 2021 at 01:31:23PM +0100, BALATON Zoltan wrote: > On Tue, 2 Feb 2021, Gerd Hoffmann wrote: > > > > My preferred solution is to have QEMU leverage the existing SPICE > > > > guest agent if at all possible, because that's already widely > > > > available in existing guest OS. > > > >

Re: vnc clipboard support

2021-02-02 Thread BALATON Zoltan
On Tue, 2 Feb 2021, Gerd Hoffmann wrote: My preferred solution is to have QEMU leverage the existing SPICE guest agent if at all possible, because that's already widely available in existing guest OS. I think spice is not as widely available as VNC (or even Synergy) so the idea to strip one of

Re: vnc clipboard support

2021-02-02 Thread Gerd Hoffmann
On Tue, Feb 02, 2021 at 11:17:09AM +, Daniel P. Berrangé wrote: > On Tue, Feb 02, 2021 at 12:10:15PM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > > How do you rate-limit intelligently to avoid overflowing the guest > > > > keyboard buffers? > > > > > > Like I said earlier in this thread,

Re: vnc clipboard support

2021-02-02 Thread Gerd Hoffmann
> > My preferred solution is to have QEMU leverage the existing SPICE > > guest agent if at all possible, because that's already widely > > available in existing guest OS. > > I think spice is not as widely available as VNC (or even Synergy) so the > idea to strip one of those down to just a guest

Re: vnc clipboard support

2021-02-02 Thread Daniel P . Berrangé
On Tue, Feb 02, 2021 at 12:10:15PM +0100, Gerd Hoffmann wrote: > Hi, > > > > How do you rate-limit intelligently to avoid overflowing the guest > > > keyboard buffers? > > > > Like I said earlier in this thread, this is a big problem with > > keyboard injection. > > It's a solved problem thou

Re: vnc clipboard support

2021-02-02 Thread Gerd Hoffmann
Hi, > > How do you rate-limit intelligently to avoid overflowing the guest keyboard > > buffers? > > Like I said earlier in this thread, this is a big problem with > keyboard injection. It's a solved problem though, the qemu vnc server has throttling implemented already. There even is an opt

Re: vnc clipboard support

2021-02-01 Thread BALATON Zoltan
On Mon, 1 Feb 2021, Daniel P. Berrangé wrote: IMHO keyboard injection is only barely better than no clipboard at all, and I don't think we should settle for that as a solution. From this discussion it looks like doing keyboard injection is not a good solution as it has more problems than what

Re: vnc clipboard support

2021-02-01 Thread Daniel P . Berrangé
On Mon, Feb 01, 2021 at 06:28:38PM +0100, Christophe de Dinechin wrote: > > > > On 1 Feb 2021, at 17:56, Daniel P. Berrangé wrote: > > > > On Mon, Feb 01, 2021 at 05:31:52PM +0100, Christophe de Dinechin wrote: > >> > >> > >> > >> But the VNC clipboard protocol is not scancode based. So wher

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 1 Feb 2021, at 17:56, Daniel P. Berrangé wrote: > > On Mon, Feb 01, 2021 at 05:31:52PM +0100, Christophe de Dinechin wrote: >> >> >>> On 1 Feb 2021, at 16:51, Daniel P. Berrangé wrote: >>> >>> On Mon, Feb 01, 2021 at 04:27:43PM +0100, Christophe de Dinechin wrote: > On

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 29 Jan 2021, at 16:04, Gerd Hoffmann wrote: > > Hi, > >> Unless we para-virtualize the keyboard? > > The main advantage of paste via key events is that it doesn't require > guest support. The main disadvantage, though, is that it does not work at all ;-) Imagine pasting Ademar's favo

Re: vnc clipboard support

2021-02-01 Thread Daniel P . Berrangé
On Mon, Feb 01, 2021 at 05:31:52PM +0100, Christophe de Dinechin wrote: > > > > On 1 Feb 2021, at 16:51, Daniel P. Berrangé wrote: > > > > On Mon, Feb 01, 2021 at 04:27:43PM +0100, Christophe de Dinechin wrote: > >> > >> > >>> On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: > >>> > >>>

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 1 Feb 2021, at 16:51, Daniel P. Berrangé wrote: > > On Mon, Feb 01, 2021 at 04:27:43PM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: >>> >>> On Fri, Jan 29, 2021 at 03:19:45PM +0100, Christophe de Dinechin wrote: > On

Re: vnc clipboard support

2021-02-01 Thread Daniel P . Berrangé
On Mon, Feb 01, 2021 at 04:27:43PM +0100, Christophe de Dinechin wrote: > > > > On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: > > > > On Fri, Jan 29, 2021 at 03:19:45PM +0100, Christophe de Dinechin wrote: > >> > >> > >>> On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: > >>> > >>>

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: > > On Fri, Jan 29, 2021 at 03:19:45PM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: >>> >>> On Fri, Jan 29, 2021 at 11:50:10AM +0100, Christophe de Dinechin wrote: > O

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > Unless we para-virtualize the keyboard? The main advantage of paste via key events is that it doesn't require guest support. Requiring any kind of software in the guest (paravirt keyboard driver, agent figuring the keymap, whatever else) kills that advantage. And if we need guest cooper

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Fri, Jan 29, 2021 at 03:19:45PM +0100, Christophe de Dinechin wrote: > > > > On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: > > > > On Fri, Jan 29, 2021 at 11:50:10AM +0100, Christophe de Dinechin wrote: > >> > >> > >>> On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: > >>> > >>> Hi,

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: > > On Fri, Jan 29, 2021 at 11:50:10AM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: >>> >>> Hi, >>> > (1) Have some guest agent (spice does it that way). >Advantage: more flex

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 12:49, Gerd Hoffmann wrote: > > Hi, > >> - What I'm suggesting is that qemu-vnc could then switch to simply >> relaying VNC traffic to that in-guest server. You'd get the smart update >> algorithm that Apple has put in place to deal with transparency and the >> like, as

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Fri, Jan 29, 2021 at 03:58:00PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Jan 29, 2021 at 3:24 PM Daniel P. Berrangé > wrote: > > > > On Fri, Jan 29, 2021 at 12:18:19AM +0400, Marc-André Lureau wrote: > > can have QEMU open the vsock device internally, it feels a bit silly to > > have

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > - What I'm suggesting is that qemu-vnc could then switch to simply > relaying VNC traffic to that in-guest server. You'd get the smart update > algorithm that Apple has put in place to deal with transparency and the > like, as well as a level of guest OS integration that would otherwise be

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Fri, Jan 29, 2021 at 12:18:19AM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Jan 28, 2021 at 9:14 PM 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 th

Re: vnc clipboard support

2021-01-29 Thread Marc-André Lureau
Hi On Fri, Jan 29, 2021 at 4:03 PM Gerd Hoffmann wrote: > > Hi, > > > - the spice protocol had a number of iterations to fix some races. It would > > be great not to repeat the same mistakes, and I don't know if VNC have the > > same flaws or not. > > # grep CAP.*CLIPBOARD.*, /usr/include/spice

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > - the spice protocol had a number of iterations to fix some races. It would > be great not to repeat the same mistakes, and I don't know if VNC have the > same flaws or not. # grep CAP.*CLIPBOARD.*, /usr/include/spice-1/spice/vd_agent.h VD_AGENT_CAP_CLIPBOARD, VD_AGENT_CAP_CLIPBO

Re: vnc clipboard support

2021-01-29 Thread Marc-André Lureau
Hi On Fri, Jan 29, 2021 at 3:24 PM Daniel P. Berrangé wrote: > > On Fri, Jan 29, 2021 at 12:18:19AM +0400, Marc-André Lureau wrote: > > Hi > > > > On Thu, Jan 28, 2021 at 9:14 PM Gerd Hoffmann wrote: > > > > > Hi folks, > > > > > > I'm looking for a good way to implement cut+paste support for

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Fri, Jan 29, 2021 at 11:50:10AM +0100, Christophe de Dinechin wrote: > > > > On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: > > > > Hi, > > > >>> (1) Have some guest agent (spice does it that way). > >>> Advantage: more flexible, allows more features. > >>> Disadvantage: requires a

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Fri, Jan 29, 2021 at 12:34:32PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Jan 29, 2021 at 12:28 PM Gerd Hoffmann wrote: > > > > > Well. That is a completely different level of desktop integration. > > It surely makes sense to have that, and dbus-over-vsock looks like > > a reasonable

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: > > Hi, > >>> (1) Have some guest agent (spice does it that way). >>> Advantage: more flexible, allows more features. >>> Disadvantage: requires agent in the guest. >> >> What about running the option to relay data to a VNC server in

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
On Fri, Jan 29, 2021 at 12:34:32PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Jan 29, 2021 at 12:28 PM Gerd Hoffmann wrote: > > > > > Well. That is a completely different level of desktop integration. > > It surely makes sense to have that, and dbus-over-vsock looks like > > a reasonable

Re: vnc clipboard support

2021-01-29 Thread Daniel P . Berrangé
On Thu, Jan 28, 2021 at 06:57:24PM +0100, Laszlo Ersek wrote: > On 01/28/21 18:12, 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 addi

Re: vnc clipboard support

2021-01-29 Thread Marc-André Lureau
Hi On Fri, Jan 29, 2021 at 12:28 PM Gerd Hoffmann wrote: > > Well. That is a completely different level of desktop integration. > It surely makes sense to have that, and dbus-over-vsock looks like > a reasonable choice. > (using vsock & dbus also goes in the direction where UIs and remote serv

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > Some things I keep in mind: > - the spice protocol had a number of iterations to fix some races. It would > be great not to repeat the same mistakes, and I don't know if VNC have the > same flaws or not. Sure. One of the reasons I've started this discussion ;) > - the GNOME desktop is w

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > Just a random thought: the guest should not be able to sniff, steal, or > overwrite host-side clipboard (selection) content, without the host user > explicitly requesting a clipboard operation. Sure. vncviewer has command line options for that, and you can also change it at runtime (F8 -

Re: vnc clipboard support

2021-01-29 Thread Gerd Hoffmann
Hi, > > (1) Have some guest agent (spice does it that way). > > Advantage: more flexible, allows more features. > > Disadvantage: requires agent in the guest. > > What about running the option to relay data to a VNC server in the > guest if there is one running? In other words, using

Re: vnc clipboard support

2021-01-28 Thread Christophe de Dinechin
Christophe (Typos are from my iPhone) > Le 28 janv. 2021 à 21:24, Marc-André Lureau a > écrit : > >  > Hi > >> On Thu, Jan 28, 2021 at 9:14 PM Gerd Hoffmann wrote: >> Hi folks, >> >> I'm looking for a good way to implement cut+paste support for vnc. >> >> The vnc core protocol has supp

Re: vnc clipboard support

2021-01-28 Thread Gerd Hoffmann
On Thu, Jan 28, 2021 at 05:35:04PM +, 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 t

Re: vnc clipboard support

2021-01-28 Thread BALATON Zoltan
On Fri, 29 Jan 2021, Marc-André Lureau wrote: I also had recently some thoughts about how to implement clipboard sharing in a more general way for QEMU. I admit I like Christophe's suggestion ("it's somebody else problem"), but it falls short to me as I don't know of a common open-source remotin

Re: vnc clipboard support

2021-01-28 Thread Marc-André Lureau
Hi On Thu, Jan 28, 2021 at 9:14 PM 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

Re: vnc clipboard support

2021-01-28 Thread Laszlo Ersek
On 01/28/21 18:12, 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, exch

Re: vnc clipboard support

2021-01-28 Thread Christophe de Dinechin
> On 28 Jan 2021, at 18:12, 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 th

Re: vnc clipboard support

2021-01-28 Thread Daniel P . Berrangé
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 > pa

vnc clipboard support

2021-01-28 Thread Gerd Hoffmann
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