When remote-viewer is started from terminal, CTRL-C sends a SIGINT signal to the program causing immediate termination. On linux clients usb redirected devices are left without any kernel driver attached, causing them to appear as no more available to the host. Add a SIGINT handler to allow a clean exit, in particular to allow the kernel to attach back the host driver. The issue is present on linux only. To perform usb device redirection, virt-viewer leverages spice-gtk library, which in turn relies on usbredir library, which uses libusb. In order to take control of the usb device the auto-loaded kernel driver must be detached. This is achieved (in the very end) with libusb_detach_kernel_driver(). Then the device interfaces can be claimed with libusb_claim_interface() and get in control to the application. During normal application termination, the usb channel is teared down, performing a reset of the usb device and giving back the control of the device to the kernel (libusb_attach_kernel_driver()). If the application quits without doing this, the device interfaces will end up with no driver attached, making them not usable in the host system. Note that enabling libusb_set_auto_detach_kernel_driver() does not solve the issue, as this is just a convenient API from libusb: libusb will take care of detaching/attaching the driver to the interfaces of the usb device each time a call to libusb_release_interface() and libusb_claim_interface() is performed. An unexpected quit of the application will skip the libusb_release_interface() call too, leaving the interfaces without any driver attached. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1713311 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Francesco Giudici <fgiudici@redhat.com> |
||
|---|---|---|
| bash-completion | ||
| build-aux | ||
| data | ||
| docs | ||
| icons | ||
| m4 | ||
| man | ||
| po | ||
| src | ||
| tests | ||
| .gitpublish | ||
| .mailmap | ||
| acinclude.m4 | ||
| AUTHORS.in | ||
| autogen.sh | ||
| cfg.mk | ||
| ChangeLog | ||
| configure.ac | ||
| COPYING | ||
| git.mk | ||
| GNUmakefile | ||
| intltool-extract.in | ||
| intltool-merge.in | ||
| intltool-update.in | ||
| maint.mk | ||
| Makefile.am | ||
| mingw-virt-viewer.spec.in | ||
| NEWS | ||
| prepare-release.sh | ||
| README.md | ||
| virt-viewer.spec.in | ||
Virt Viewer
Virt Viewer provides a graphical viewer for the guest OS display. At this time is supports guest OS using the VNC or SPICE protocols. Further protocols may be supported in the future as user demand dictates. The viewer can connect directly to both local and remotely hosted guest OS, optionally using SSL/TLS encryption.
Virt Viewer is the GTK3 application. Virt Viewer 3.0 was the last release that supported GTK2.
Virt Viewer uses the GTK-VNC (>= 0.4.0) widget to provide a display of the VNC protocol, which is available from
https://wiki.gnome.org/Projects/gtk-vnc
Virt Viewer uses the SPICE-GTK (>= 0.35) widget to provide a display of the SPICE protocol, which is available from:
https://www.spice-space.org/download.html
Use of either SPICE-GTK or GTK-VNC can be disabled at time
of configure, with --without-gtk-vnc or --without-spice-gtk
respectively.
Virt Viewer uses libvirt to lookup information about the guest OS display. This is available from
Further information about the Virt Viewer application can be found on the Virt Manager website:
Feedback should be directed to the mailing list at