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:

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