[virt-tools-list] [PATCH 3/3] details: Add auto USB redirection support in console viewer

Leonardo Augusto Guimarães Garcia lagarcia at linux.vnet.ibm.com
Sat Jun 29 01:55:06 UTC 2013


On 06/28/2013 09:13 PM, Leonardo Augusto Guimarães Garcia wrote:
> On 06/28/2013 07:51 PM, Guan Nan Ren wrote:
>>
>> ----- Original Message -----
>> From: "Leonardo Augusto Guimarães Garcia" <lagarcia at linux.vnet.ibm.com>
>> To: "Guannan Ren" <gren at redhat.com>
>> Cc: virt-tools-list at redhat.com
>> Sent: Friday, June 28, 2013 5:32:20 PM
>> Subject: Re: [virt-tools-list] [PATCH 3/3] details: Add auto USB 
>> redirection support in console viewer
>>
>> Patch looks good. USB redirection worked for me (almost) as expected
>> when using latest spice-gtk from git.
>>
>> What I mean by almost is that when I plugged my USB storage device into
>> the USB Port, I got an error dialog saying:
>>
>> Could not open usb device: Access denied (insufficient permissions) [-3]
>>
>> And if I expand the details on the dialog, I have:
>>
>> USB redirection error
>>
>> None
>>
>> However, the USB storage device was correctly auto-connected to the 
>> guest!
>>
>> Not sure if this error message is due to my test environment (I might
>> have forgotten to properly install/configure something as I have never
>> built spice-gtk before). IOW, overall the patch looks good for me. One
>> minor nit below.
>>
>> Leonardo
>>
>> I ran into this permission issue before. Hans gave the answer.
>> the polkit-devel package is needed for compiling a helper program.
>> spice-client-glib-usb-acl-helper which can fix my issue.
>>
>> https://www.redhat.com/archives/virt-tools-list/2013-June/msg00127.html
>>
>> The error dialog is expected in this case, but the auto-connected is 
>> not quite right.
>> I often open virt-manager debug, you can try it, see if anything is 
>> userful.
>> "python virt-manager --debug"
>>
>> My local testing is the error dialog popup and block the 
>> auto-connection.
> Yes... actually I was thinking in the past hours about the message 
> sent before by Hans and I just noticed it was a failure in my test. I 
> just rerun my test and when I was going to write to the mailing-list I 
> saw your message. I'll give it a try with polkit-devel installed and 
> will get the results back here.
Ok, with polkit-devel and libacl-devel things are working as expected. 
Thanks!

Best regards,

Leonardo Garcia
>
> Best regards,
>
> Leonardo Garcia
>>
>>
>> On 06/29/2013 02:08 AM, Guannan Ren wrote:
>>> Add "Redirect USB device" option in console viewer. Initialize and
>>> embed UsbDeviceWidget object from SpiceClientGtk into a dialog to
>>> let user choose available USB devices for redirection.
>>> Throw an error message if USB connection failed.
>>> Auto-redirection is enable by default.
>>>
>>> There is race between creating usbredir channel and calling
>>> has_usb_redirection() when initializing spice session like
>>> happening on virt-viwer. So adding a new signal handler
>>> on_details_menu_virtual_manager_activate() to recheck the
>>> status of usbredir channel, set "Redirect USB device" option
>>> sensitive if it is availiable.
>> <snip>
>>
>>>        def init_menus(self):
>>> -        # Shutdown button menu
>>> +        # Virtual Machine menu
>>> + self.widget("details-menu-usb-redirection").set_tooltip_text(
>>> +            _("Redirect USB device attached on host to virtual 
>>> machine with SPICE graphics. USB Redirection device is required for 
>>> Virtual Machine to support this functionality. Auto-redirection is 
>>> enabled by default"))
>> Can't we set the tooltip in the UI XML file and avoid this extremely
>> long line in the code? I think it should be easy to do that with glade.
>>
>> Yeah, when I try to add it into ui/vmm-details.ui, I found, there is 
>> no one <tooltip_text> which is so long like this.
>> In details.py there are some of them with same length such as 
>> "Security info tooltips". So I just keep it in there.
>> We need Cole's advise here.
>>
>> Guannan
>>
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>




More information about the virt-tools-list mailing list