Bug 869747 - Unable to open virt-manager using sudo virt-manager
Summary: Unable to open virt-manager using sudo virt-manager
Keywords:
Status: CLOSED DUPLICATE of bug 579579
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-24 18:03 UTC by Vijaykumar
Modified: 2012-10-24 19:09 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-10-24 19:09:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Vijaykumar 2012-10-24 18:03:56 UTC
Description of problem:
Normal user with sudo access unable to open virt-manager. Getting below error.

[vijneman@KVMHost-5CF3FC94C58C Desktop]$ sudo virt-manager
[sudo] password for vijneman: 
No protocol specified
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 286, in main
    raise gtk_error
RuntimeError: could not open display

Version-Release number of selected component (if applicable):

Version-Release number of selected component (if applicable):


How reproducible:
sudo virt-manager

Steps to Reproduce:
1. Login to server with normal user.
2. start vnc with normal user and login to vnc session
3. run sudo virt-manager
  
Actual results:
[vijneman@KVMHost-5CF3FC94C58C Desktop]$ sudo virt-manager
[sudo] password for vijneman: 
No protocol specified
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 286, in main
    raise gtk_error
RuntimeError: could not open display

Expected results:
Virt-manager suppose to be open

Additional info:

Comment 1 Dave Allan 2012-10-24 19:09:45 UTC
This behavior is a result of the way that PolicyKit works.  There's more information available at https://bugzilla.redhat.com/show_bug.cgi?id=579579#c18

*** This bug has been marked as a duplicate of bug 579579 ***


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