Use spice-vdagent to copy text and hide the mouse

Source: Internet
Author: User

The latest version of the spice-vdagent-0.10.1 after their own experiments, is available, indeed solved some problems, first look at the official statement:

Spice agent for Linux
==================================

The spice agent for Linux consists of 2 parts, a daemon spice-vdagentd and
A per x-session process spice-vdagent. The Daemon gets started in SPICE guests
Through a sys-V initscript. The per x-session gets automatically started in
Desktop environments which honor/etc/xdg/autostart, and under TPD.

The main daemon needs to know which X-session daemon is the currently
Active X-session (think switch user functionality) for this console kit is
Used. Spice-vdagent can be compiled without console kit support for use
Older distributions, in this case only one Active X session is allowed.

Features:
* Client mouse mode (no need to grab mouse by client, no mouse lag)
This is handled by the daemon by feeding mouse events into the kernel
Via uinput. This will only work if the Active X-session is running
Spice-vdagent process so that its resolution can be determined.
* Automatic adjustment of the X-session resolution to the client resolution
For single monitor configurations.
* Support of copy and paste (text and images) between the Active X-session
And the client. This supports both the primary selection and the clipboard.
* Limited support for multiple displays, prerequisites:
* A New enough Xorg-server. For fedora atleast fedora-17, for RHEL-6 atleast
Xorg-x11-server-1.10.4-6.el6_2.3
* A vm configured with multiple qxl Devices
* A guest running the latest spice-vdagent
Then connect to the VM with the multiple Monitor client which you want
Use it with using: "spicec -- full-screen = auto-config" (or the user Portal
Equivalent). At this point the agent will write out:
/Var/run/spice-vdagentd/Xorg. conf. Spice file. With all the necessary magic
To get xinerama working. Move this file to/etc/X11/Xorg. conf, then kill
Xorg so that it will get restarted and you shoshould be good to go.

All vdagent communications on the guest side run over a single pipe which
Gets presented to the guest OS as a virtio serial port.

 

To sum up its functions:

    • Copy & Paste between guest and client
    • Automatic guest resolution adjustment while entering fullscreen Mode
    • Guest side mouse which allows you to move mouse continuously within guest and client without pressing sihft + F12

Start with a normal KVM command and add the following options:

For qemu <0.14.0:
-Device spicevmc

For qemu> = 0.14.0:
-Device virtio-serial-PCI, id = virtio-serial0, max_ports = 16, bus = pci.0, ADDR = 0x5 \
-Chardev spicevmc, name = vdagent, id = vdagent \
-Device \
Virtserialport, Nr = 1, bus = virtio-serial0.0, chardev = vdagent, name = com. RedHat. spice.0

 

Qemu-KVM-Device virtio-serial-chardev spicevmc, id = vdagent, DEBUG = 0, name = vdagent-device ready SerialPort, chardev = vdagent, name = com. RedHat. spice.0-Spice Port = 3001, disable-ticketing-VGA qxl-soundhw ac97/path/to/Your/guest. img

If you're facing-chardev issue (then you're probably using older qemu-KVM from rhel6) then use following arguments instead.

Qemu-KVM-Device virtio-serial-device spicevmc-device implements SerialPort-Spice Port = 3001, disable-ticketing-VGA qxl-soundhw ac97/path/to/Your/guest. img

Or KVM-M 1024-name rhel6-drive file = rhel6.img, if = virtio-VGA qxl-spice Port = 5900, ADDR = 127.0.0.1, disable-ticketing-device virtio-serial-PCI, id = virtio-serial0, max_ports = 16, bus = pci.0, ADDR = 0x5-chardev spicevmc, name = vdagent, id = vdagent-device serial SerialPort, Nr = 1, bus = virtio-serial0.0, chardev = vdagent, name = com. redHat. spice.0

Through the experiment, two-way copy of text is feasible, but images is not feasible.

What are the results of the experiment.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.