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.

Bug 676333

Summary: RuntimeError: could not open display
Product: Red Hat Enterprise Linux 6 Reporter: Jan Stodola <jstodola>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Petr Šplíchal <psplicha>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: ohudlick, sgrubb
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: authconfig-6.1.12-5.el6 Doc Type: Bug Fix
Doc Text:
The "system-config-authentication" command crashed when executed in an environment without the X server running. With this update, a proper error message is printed in the aforementioned case.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:11:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stodola 2011-02-09 15:02:07 UTC
Description of problem:
system-config-authentication executed in non-graphical environment throws a traceback:

[root@rtt6 ~]# system-config-authentication 
Traceback (most recent call last):
  File "/usr/sbin/system-config-authentication", line 27, in <module>
    import msgarea
  File "/usr/share/authconfig/msgarea.py", line 19, in <module>
    import gtk, gobject
  File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
    _init()
  File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
    _gtk.init_check()
RuntimeError: could not open display


Version-Release number of selected component (if applicable):
authconfig-gtk-6.1.12-3.el6.s390x

How reproducible:
always

Steps to Reproduce:
1. login to a system using ssh -x username@name
2. run system-config-authentication
  
Actual results:
traceback when running system-config-authentication via ssh -x connection

Expected results:
User should see a human readable message, not any traceback, see system-config-lvm for example:

[root@rtt6 ~]# system-config-lvm 

  Unable to initialize graphical environment. Most likely cause of failure
  is that the tool was not run using a graphical environment. Please either
  start your graphical user interface or set your DISPLAY variable.
                                                                                
  Caught exception: could not open display

Comment 4 Tomas Mraz 2011-03-25 11:33:15 UTC
OK, I added a better fix. It will now always print out the error message same as the system-config-lvm prints.

Comment 6 Martin Prpič 2011-04-18 13:02:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The "system-config-authentication" command crashed when executed in an environment without the X server running. With this update, a proper error message is printed in the aforementioned case.

Comment 7 errata-xmlrpc 2011-05-19 13:11:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0595.html