Bug 976689 - Got a traceback when run "subscription-manger-gui --help" in a terminal when X window can't be opened.
Summary: Got a traceback when run "subscription-manger-gui --help" in a terminal when ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510
TreeView+ depends on / blocked
 
Reported: 2013-06-21 07:58 UTC by xingge
Modified: 2016-09-20 02:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 23:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1290885 0 medium CLOSED subscription-manager-gui --help warnings and traceback 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Internal Links: 1290885

Description xingge 2013-06-21 07:58:05 UTC
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 Program Management 2013-06-21 08:17:54 UTC
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 21:06:28 UTC
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

Comment 4 xingge 2013-07-12 07:29:26 UTC
[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 23:11:01 UTC
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.