Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description
No error shows when launch virt-manager from host via ssh without X forwarding
Version:
virt-manager-0.10.0-7.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1. Install virt-manager
2. Connect to a remote host via ssh without X forwarding
# ssh root@$ip
3. Execute virt-manager,no error shows and virt-manager is not launched.
# virt-manager
When add --debug option,the info shows as:
# virt-manager --debug
2013-12-05 15:58:51,543 (cliutils:75): virt-manager startup
2013-12-05 15:58:51,543 (virt-manager:201): Launched as: ['/usr/share/virt-manager/virt-manager', '--debug']
2013-12-05 15:58:51,544 (virt-manager:202): virt-manager version: 0.10.0
2013-12-05 15:58:51,544 (virt-manager:203): virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'>
2013-12-05 15:58:51,693 (virt-manager:249): GTK version: 3.8.4
(virt-manager:22170): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
2013-12-05 15:58:51,699 (virt-manager:55): Error starting virt-manager
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager", line 308, in <module>
main()
File "/usr/share/virt-manager/virt-manager", line 270, in main
icon_theme.prepend_search_path(cliconfig.icon_dir)
AttributeError: 'NoneType' object has no attribute 'prepend_search_path'
2013-12-05 15:58:51,718 (cliutils:87): Uncaught exception:
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager", line 316, in <module>
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/usr/share/virt-manager/virt-manager", line 63, in _show_startup_error
debug=False)
File "/usr/share/virt-manager/virtManager/error.py", line 86, in show_err
buttons=buttons)
File "/usr/share/virt-manager/virtManager/error.py", line 189, in __init__
Gtk.MessageDialog.__init__(self, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 519, in __init__
**kwds)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 446, in __init__
Gtk.Dialog.__init__(self, **kwds)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 416, in __init__
raise RuntimeError("Gtk couldn't be initialized")
RuntimeError: Gtk couldn't be initialized
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager", line 316, in <module>
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/usr/share/virt-manager/virt-manager", line 63, in _show_startup_error
debug=False)
File "/usr/share/virt-manager/virtManager/error.py", line 86, in show_err
buttons=buttons)
File "/usr/share/virt-manager/virtManager/error.py", line 189, in __init__
Gtk.MessageDialog.__init__(self, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 519, in __init__
**kwds)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 446, in __init__
Gtk.Dialog.__init__(self, **kwds)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 416, in __init__
raise RuntimeError("Gtk couldn't be initialized")
RuntimeError: Gtk couldn't be initialized
Actual results:
As step 3 describes.
Expected results:
A user friendly error message shows,eg:"There is no display available to execute virt-manager. DISPLAY is not set."
Additional info:
The issue can not be reproduced on rhel 6, and there is bug 1025706 on rhel 6 to ask for a more friendly error message.
I retest this issue with build virt-manager-0.10.0-8.el7:
Currently, following error will display:
--------------------------------------------
Gtk couldn't be initialized: Could not open display:
--------------------------------------------
Need info for 2 points for your patch:
1. The command line will hang after Error display, and the user need press "Enter" to go back command line;
2. Is the Colon at the end after word "display" necessary?
Thanks.
According comment3, change the bug status to assigned.
Giuseppe, would you please have a check for the needinfo?
Comment 5Giuseppe Scrivano
2013-12-24 09:41:01 UTC
1. cannot be changed (at least not so easily to accept it at a so late stage), virt-manager forks another process before open the display and the forked process will display that message.
2 can be fixed, the last part should be showed only when DISPLAY is set.
Verified the bug based on the following steps:
# rpm -qa virt-manager
virt-manager-0.10.0-11.el7.noarch
# virt-manager --no-fork
** (virt-manager:2740): WARNING **: Could not open X display
Gtk couldn't be initialized
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description No error shows when launch virt-manager from host via ssh without X forwarding Version: virt-manager-0.10.0-7.el7.noarch How reproducible: 100% Steps to Reproduce: 1. Install virt-manager 2. Connect to a remote host via ssh without X forwarding # ssh root@$ip 3. Execute virt-manager,no error shows and virt-manager is not launched. # virt-manager When add --debug option,the info shows as: # virt-manager --debug 2013-12-05 15:58:51,543 (cliutils:75): virt-manager startup 2013-12-05 15:58:51,543 (virt-manager:201): Launched as: ['/usr/share/virt-manager/virt-manager', '--debug'] 2013-12-05 15:58:51,544 (virt-manager:202): virt-manager version: 0.10.0 2013-12-05 15:58:51,544 (virt-manager:203): virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'> 2013-12-05 15:58:51,693 (virt-manager:249): GTK version: 3.8.4 (virt-manager:22170): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed 2013-12-05 15:58:51,699 (virt-manager:55): Error starting virt-manager Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager", line 308, in <module> main() File "/usr/share/virt-manager/virt-manager", line 270, in main icon_theme.prepend_search_path(cliconfig.icon_dir) AttributeError: 'NoneType' object has no attribute 'prepend_search_path' 2013-12-05 15:58:51,718 (cliutils:87): Uncaught exception: Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager", line 316, in <module> _show_startup_error(str(run_e), "".join(traceback.format_exc())) File "/usr/share/virt-manager/virt-manager", line 63, in _show_startup_error debug=False) File "/usr/share/virt-manager/virtManager/error.py", line 86, in show_err buttons=buttons) File "/usr/share/virt-manager/virtManager/error.py", line 189, in __init__ Gtk.MessageDialog.__init__(self, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 519, in __init__ **kwds) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 446, in __init__ Gtk.Dialog.__init__(self, **kwds) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 416, in __init__ raise RuntimeError("Gtk couldn't be initialized") RuntimeError: Gtk couldn't be initialized Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager", line 316, in <module> _show_startup_error(str(run_e), "".join(traceback.format_exc())) File "/usr/share/virt-manager/virt-manager", line 63, in _show_startup_error debug=False) File "/usr/share/virt-manager/virtManager/error.py", line 86, in show_err buttons=buttons) File "/usr/share/virt-manager/virtManager/error.py", line 189, in __init__ Gtk.MessageDialog.__init__(self, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 519, in __init__ **kwds) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 446, in __init__ Gtk.Dialog.__init__(self, **kwds) File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 416, in __init__ raise RuntimeError("Gtk couldn't be initialized") RuntimeError: Gtk couldn't be initialized Actual results: As step 3 describes. Expected results: A user friendly error message shows,eg:"There is no display available to execute virt-manager. DISPLAY is not set." Additional info: The issue can not be reproduced on rhel 6, and there is bug 1025706 on rhel 6 to ask for a more friendly error message.