Bug 804187 - USB dialog should provide some help when no device available.
USB dialog should provide some help when no device available.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Christophe Fergeau
Desktop QE
:
: 868106 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 15:06 EDT by Marc-Andre Lureau
Modified: 2013-02-21 03:47 EST (History)
13 users (show)

See Also:
Fixed In Version: spice-gtk-0.14-4.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:47:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marc-Andre Lureau 2012-03-16 15:06:25 EDT
The redirection dialog can feel a bit strange when there is no device to redirect.

It could be useful to provide a help message indicating that there is no device to redirect yet, and that the user can insert a USB device to redirect, and some related guidance.
Comment 4 RHEL Product and Program Management 2012-07-10 04:50:04 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 5 RHEL Product and Program Management 2012-07-10 22:00:27 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 6 Daniel Berrange 2012-07-26 13:22:11 EDT
The guts of the USB device selection dialog are provided by the following function

  spice_usb_device_widget_new

this is part of the spice-client-gtk library
Comment 9 Milan Barta 2012-10-15 07:43:51 EDT
Tested on spice-gtk-0.14-3.el6.x86_64 containing the fix from comment 7.

When the USB device selection dialog window from remote-viewer connected to a VM is invocated, there are no USB devices listed for redirection even though they are physically present.
Only the newly provided message saying "No USB devices detected" is shown.
Comment 10 Marc-Andre Lureau 2012-10-15 08:41:30 EDT
(In reply to comment #9)
> Tested on spice-gtk-0.14-3.el6.x86_64 containing the fix from comment 7.
> 
> When the USB device selection dialog window from remote-viewer connected to
> a VM is invocated, there are no USB devices listed for redirection even
> though they are physically present.
> Only the newly provided message saying "No USB devices detected" is shown.

That looks like a different bug then. The original bug I reported is that there was no help message, and now there is one.

If your device is not listed, there might be several reasons. What USB device is it? When did you plug the device?
Comment 11 Milan Barta 2012-10-15 09:24:46 EDT
Ok, there is the help message now. But the problem is the message is there no matter what USB device is connected.

My lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 001 Device 004: ID 17ef:100a Lenovo ThinkPad Mini Dock Plus Series 3
Bus 001 Device 005: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 006: ID 046d:c069 Logitech, Inc. M500 Laser Mouse
Bus 001 Device 007: ID 046a:0011 Cherry GmbH G83 (RS 6000) Keyboard
Bus 002 Device 004: ID 13fe:3100 Kingston Technology Company Inc. 2/4 GB stick

None of theese devices are listed in the dialog. Only the "No USB devices detected" message is shown there.

Auto redirection works fine, the plugged device gets connected and still doesn't show up in the USB device dialog.
Comment 12 Christophe Fergeau 2012-10-15 15:40:44 EDT
The patch also contains the corresponding git commit log which can be found at http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=0ede57e56b84fba4db2f3578541ce3e0eb06bcb3

Among other things, it contains this:
"This can be tested with
diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c
index b1bf090..660ea03 100644
--- a/gtk/usb-device-widget.c
+++ b/gtk/usb-device-widget.c
@@ -220,6 +220,11 @@ static GObject *spice_usb_device_widget_constructor(
                      G_CALLBACK(device_error_cb), self);

     devices = spice_usb_device_manager_get_devices(priv->manager);
+    if (devices) {
+        g_ptr_array_unref(devices);
+        devices = NULL;
+    }
+
     if (!devices)
         goto end;"

and it seems the %patch command in the .spec picked this part of the .patch as if this was something to apply rather than just some comment... I've observed this when running rhpkg prep, and having this hunk in the build explains what you are seeing.
Comment 15 Christophe Fergeau 2012-10-17 09:14:57 EDT
Pushed a new build which should address this issue.
Comment 17 Christophe Fergeau 2012-10-19 04:26:16 EDT
*** Bug 868106 has been marked as a duplicate of this bug. ***
Comment 20 errata-xmlrpc 2013-02-21 03:47:05 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0343.html

Note You need to log in before you can comment on or make changes to this bug.