Re: [PATCH] Implement paste from clipboard functionality

On Wed, Dec 15, 2010 at 07:06:24PM +0100, Michal Novotny wrote:
> Hi,
> this is the patch to implement paste from clipboard to the VNC Window
> functionality. This is the first version of the patch, tested mainly
> to copy & paste URL addresses to the virtual machines to be used as
> an installation source (e.g. in anaconda when using network install).
> The core functionality is done by the vnc_display_clipboard_paste()
> functionality that has been inspired by xsel source code to grab the
> clipboard contents. Also, a new function to send multiple scancodes
> per character, called the vnc_display_send_character() has been
> introduced since vnc_display_send_keys_ex() was having issue when
> sending multiple characters at once. Mainly special characters like
> slashes, backslashes, commas, semicolons, exclamation marks etc.
> were having issues when used in vnc_display_send_keys_ex() so the
> implementation of vnc_display_send_character() was necessary for
> this purpose.

IMHO this is really not a desirable approach to the problem
of cut+paste. VNC has a proper cut+paste protocol. The issue
is that with virtual machines, there's no automatic way to
wire this up to the guest OS. It requires an agent to be 
installed in the guest OS, at which point QEMU can wire up
the normal VNC cut+paste support. A VNC client has no way to
know whether cut+paste is supported or not, so it can't tell
whether to use the regular VNC cut+paste APIs, or this alternative
approach you're proposing. If an agent is not present, then QEMU
itself coould fake the 'paste' operation using the approach you
demonstrate of generating key events.

So in summary I don't think this patch belongs in GTK-VNC. You
might propose this as an idea on qemu-devel, and see if they think
it is desirable for QEMU itself todo this in the non-guest agent

|:      -o- :|
|:              -o-    :|
|:       -o- :|
|:       -o- :|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]