Bug 869747 - Unable to open virt-manager using sudo virt-manager
Unable to open virt-manager using sudo virt-manager
Status: CLOSED DUPLICATE of bug 579579
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-24 14:03 EDT by Vijaykumar
Modified: 2012-10-24 15:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-24 15:09:45 EDT
Type: Bug
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 Vijaykumar 2012-10-24 14:03:56 EDT
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 15:09:45 EDT
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.