This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 481756 - traceback when starting like a nonroot
traceback when starting like a nonroot
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-manager (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-27 08:57 EST by Petr Sklenar
Modified: 2009-12-14 16:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-27 09:46:44 EDT
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 Petr Sklenar 2009-01-27 08:57:37 EST
Description of problem:
traceback when starting like a nonroot

Version-Release number of selected component (if applicable):
virt-manager-0.5.3-8.el5

How reproducible:
alwayd

Steps to Reproduce:
1. su nonroot
2. virt-manager
  
Actual results:
traceback

Expected results:
It should ask for password up to pam, then star virt-manager

Additional info:
[testuser@dhcp-lab-159 root]$ virt-manager 
Xlib: connection to ":3.0" refused by server
Xlib: No protocol specified

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 304, in ?
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 224, in main
    import gtk
  File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
    _init()
  File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init
    _gtk.init_check()
RuntimeError: could not open displa
Comment 1 Petr Sklenar 2009-01-27 09:18:45 EST
i made mistake in first comment, version is latest:
Version-Release number of selected component (if applicable):
virt-manager-0.5.3-10.el5

I have problem with connection even with connection vie ssh -X ?:

.qa.[root@i386-5s-m1 ~]# virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 321, in ?
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 241, in main
    import gtk
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
    _init()
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init
    _gtk.init_check()
RuntimeError: could not open display

--------
only when I am on machine like a root, then virt-manager works
Comment 2 Cole Robinson 2009-03-09 14:14:45 EDT
Do you enter the root password or select 'Run Unprivileged' when the initial dialog pops up?

Is anything in your set up out of the norm? (NFS home directory, running over vnc, ssh, etc.)
Comment 3 Cole Robinson 2009-04-23 11:48:55 EDT
Ping Petr, can you provide the info in Comment #2?
Comment 4 Petr Sklenar 2009-04-24 04:54:06 EDT
Hi, i am sorry for late response 

There is everything in normal what I can say. I have no chance to choose between  'Run Unprivileged' or "something else".

I log to whole system like a root
then in terminal `su nonroot` and traceback with "opening window" is there


no I found thet when I su with "-", like `su - nonroot` then it works as expected

You can try it on my machine :
dhcp-lab-159.englab.brq.redhat.com
Comment 5 Cole Robinson 2009-04-27 09:46:44 EDT
If you log into a machine as root, then 'su' to a regular user, graphical apps won't be able to access roots DISPLAY (this isn't specific to virt-manager, try launching gnome-display-properties or similar). You'll need to use 'su -'.

So, closing as NOTABUG. Please reopen if I'm misunderstanding.

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