Description of problem: Got a traceback when run "subscription-manger-gui --help" in a terminal when X window can't be opened. Version-Release number of selected component (if applicable): subscription-manager-firstboot-1.8.10-1.el5 subscription-manager-gui-1.8.10-1.el5 subscripiton-manager-1.8.10.el5 python-rhsm-1.8.12-1.el5 How reproducible: always Steps to Reproduce: 1.Go into a terminal and make sure the X window can not be opened. you can use "Ctrl" + "Alt" + "F2" to go into terminal for local system, or use ssh with out "-X" to connect a remote system. 2.Run subscription-manager-gui --help #subscription-manager-gui --help Actual results: [root@dhcp-66-103-30 ~]# subscription-manager-gui --help Traceback (most recent call last): File "/usr/sbin/subscription-manager-gui", line 40, in ? 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 display Expected results: no traceback would show. The help doc should be shown like below: Usage: subscription-manager-gui [OPTIONS] Options: -h, --help show this help message and exit --register launches the registration dialog on startup Additional info: Other app like firefox, gedit won't get this traceback when using the same environment with the same step. This bug also happend in the 6.3GA, so I think maybe it is in the 5.9GA 6.4GA too.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
When running any subscription-manager-gui command, if there is no display, we print the message "Unable to open a display" subscription-manager-gui --help will print that and exit (no help message) if there is no display, we may fix that at another time, but it will require a bit of a refactor. commit a3d31e03b4beda13ca036c9fd4553ce07feecc8f Author: ckozak <ckozak> Date: Thu Jun 27 16:47:02 2013 -0400 976689: Handle no xorg server, allow help
[root@dhcp-66-102-178 ~]# subscription-manager-gui --help Unable to open a display Verified,but I think it should display the help doc of the rhsm gui, like gedit does.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1332.html