Hide Forgot
Description of problem: system-config-kickstart executed in non-graphical environment throws a traceback: [root@rtt6 ~]# system-config-kickstart Traceback (most recent call last): File "/usr/bin/system-config-kickstart", line 28, in <module> from meh.ui.gui import GraphicalIntf File "/usr/lib/python2.6/site-packages/meh/ui/gui.py", line 21, in <module> import gtk 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): system-config-kickstart-2.8.6.3-1.el6.noarch How reproducible: always Steps to Reproduce: 1. login to a system using ssh -x username@name 2. run system-config-kickstart Actual results: traceback when running system-config-kickstart 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
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
If you apply the following patch to /usr/share/system-config-kickstart, I think it'll fix the problem up. index cd41e6a..f9b511a 100755 --- a/src/system-config-kickstart +++ b/src/system-config-kickstart @@ -24,9 +24,8 @@ import signal import sys, os -from meh.dump import * -from meh.ui.gui import GraphicalIntf -from meh.handler import * +from meh.dump import ExceptionDump +from meh.handler import ExceptionHandler sys.path.append("/usr/share/system-config-kickstart") @@ -90,7 +89,8 @@ if __name__ == "__main__": try: import kickstartGui - except: + from meh.ui.gui import GraphicalIntf + except RuntimeError: print (_("Could not open display because no X server is running.")) print (_("Try running 'system-config-kickstart --help' for a list of options.")) sys.exit(0)
patch applied on /usr/bin/system-config-kickstart: * it fixes the issue for sessions without X: [root@dell-per905-01 ~]# system-config-kickstart Could not open display because no X server is running. Try running 'system-config-kickstart --help' for a list of options. * it breaks sessions with X (tested using X11 forwarding): [root@dell-per905-01 system-config-kickstart]# system-config-kickstart /usr/share/system-config-kickstart/kickstartGui.py:101: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated xml = gtk.glade.XML ("system-config-kickstart.glade", domain="system-config-kickstart") Traceback (most recent call last): File "/usr/bin/system-config-kickstart", line 100, in <module> config = Config(programName="system-config-kickstart", NameError: name 'Config' is not defined This modification fixes the new problem, both X and non-X works as expected: -from meh.handler import ExceptionHandler +from meh.handler import ExceptionHandler, Config
Ah, good catch. Thanks.
*** Bug 705121 has been marked as a duplicate of this bug. ***
Tested with system-config-kickstart-2.8.6.4-1.el6.noarch 1) Without X # system-config-kickstart Could not open display because no X server is running. Try running 'system-config-kickstart --help' for a list of options. 2) With X forwarding (ssh -X) - GUI started successfully 3) With X running locally (Xvnc) - GUI started successfully
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-2011-1683.html