Bug 976689 - Got a traceback when run "subscription-manger-gui --help" in a terminal when X window can't be opened.
Got a traceback when run "subscription-manger-gui --help" in a terminal when ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.10
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Carter Kozak
IDM QE LIST
:
Depends On:
Blocks: rhsm-rhel510
  Show dependency treegraph
 
Reported: 2013-06-21 03:58 EDT by xingge
Modified: 2016-09-19 22:28 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-30 19:11:01 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 18:49:24 EDT

  None (edit)
Description xingge 2013-06-21 03:58:05 EDT
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.
Comment 1 RHEL Product and Program Management 2013-06-21 04:17:54 EDT
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.
Comment 2 Carter Kozak 2013-06-28 17:06:28 EDT
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@redhat.com>
Date:   Thu Jun 27 16:47:02 2013 -0400

    976689: Handle no xorg server, allow help
Comment 4 xingge 2013-07-12 03:29:26 EDT
[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.
Comment 7 errata-xmlrpc 2013-09-30 19:11:01 EDT
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

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