Bug 481756 - traceback when starting like a nonroot
Summary: traceback when starting like a nonroot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-manager
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-27 13:57 UTC by Petr Sklenar
Modified: 2009-12-14 21:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-27 13:46:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2009-01-27 13:57:37 UTC
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 14:18:45 UTC
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 18:14:45 UTC
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 15:48:55 UTC
Ping Petr, can you provide the info in Comment #2?

Comment 4 Petr Sklenar 2009-04-24 08:54:06 UTC
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 13:46:44 UTC
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.