Bug 437290

Summary: Error when giving OK, doesn't exit
Product: [Fedora] Fedora Reporter: Horst H. von Brand <vonbrand>
Component: system-config-keyboardAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: 12spahn46, dcantrell, fedora, flokip, fred.new2911, leon.stringer, lsof, michal, notting, pingoufc4
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-keyboard-1.2.14-3.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-13 16:13:29 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:
Bug Depends On:    
Bug Blocks: 235706    
Attachments:
Description Flags
xorg.conf
none
Pingou's xorg.conf none

Description Horst H. von Brand 2008-03-13 12:42:25 UTC
Description of problem:
Running system-config-keyboard from a terminal gives the following when pressing
OK, the application doesn't exit:

Loading /lib/kbd/keymaps/i386/qwerty/es.map.gz
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 223, in _okClicked
    return self.apply(None, False)
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 117, in apply
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 32, in
modifyXconfig
    import xf86config
  File "/usr/lib/python2.5/site-packages/xf86config.py", line 1, in <module>
    import ixf86config
ImportError: /usr/lib/python2.5/site-packages/ixf86configmodule.so: undefined
symbol: xf86freeInputrefList

Version-Release number of selected component (if applicable):
system-config-keyboard-1.2.12-1.fc9.noarch

How reproducible:
Always

Steps to Reproduce:
1. Start system-config-keyboard from a gnome-terminal
2. Select Spanish layout, give OK
3.
  
Actual results:
Error message, program doesn't quit

Expected results:


Additional info:

Comment 1 Horst H. von Brand 2008-03-16 01:53:27 UTC
Something else fixed this (?)


Comment 2 Bill Nottingham 2008-03-25 21:37:26 UTC
Nope, it's still broken on an install I have here. This needs fixed by release
or we need to take it out of the default install...

Comment 3 Fred New 2008-03-28 08:05:31 UTC
My traceback looks a little different, but the results are exactly the same. 
Same system-config-keyboard version as above:

# system-config-keyboard
Loading /lib/kbd/keymaps/i386/qwerty/et.map.gz
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 223, in _okClicked
    return self.apply(None, False)
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 117, in apply
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 34, in
modifyXconfig
    keyboard = xf86config.getCoreKeyboard(xconfig)
  File "/usr/lib/python2.5/site-packages/xf86config.py", line 177, in
getCoreKeyboard
    raise XF86SectionMissing("No CoreKeyboard InputDevice found in the layout")
xf86config.XF86SectionMissing
#

Comment 4 Fred New 2008-03-29 06:51:01 UTC
For what it may be worth, clicking OK actually assigns the correct keyboard for
the session.  After logging out (if I can log out) or restarting the system
gives me back the default US? keyboard.

Comment 5 Horst H. von Brand 2008-03-30 22:54:20 UTC
My original problem (and the mess in comment #4) is gone now for me.

Comment 6 Fred New 2008-03-31 06:24:32 UTC
I've still got the same problem, but I tend to be on the late side of mirror
propagation.  Maybe I'll see something tomorrow.

Comment 7 Sebastian Vahl 2008-04-01 20:11:43 UTC
Created attachment 299962 [details]
xorg.conf

Same problem here as in comment #3
system-config-keyboard-1.2.14-1.fc9.noarch

This happens on a local installation and also on Fedora-9-Beta-Live-KDE.

Comment 8 Jesse Keating 2008-04-03 19:55:31 UTC
Hrm, I wonder if it's because we don't write those sections out in Xorg config
anymore, so the tool can't edit them.

Smells like it to me.

Comment 9 Fred New 2008-04-07 07:54:06 UTC
This problem continues unchanged with system-config-keyboard-1.2.14-2.fc9.noarch.

Comment 10 Pierre-Yves 2008-04-07 08:15:23 UTC
Same problem with me 

It returns:

# system-config-keyboard 
Loading /lib/kbd/keymaps/i386/qwerty/us-acentos.map.gz
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 226, in _okClicked
    return self.apply(None, False)
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 117, in apply
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 34, in
modifyXconfig
    keyboard = xf86config.getCoreKeyboard(xconfig)
  File "/usr/lib64/python2.5/site-packages/xf86config.py", line 177, in
getCoreKeyboard
    raise XF86SectionMissing("No CoreKeyboard InputDevice found in the layout")
xf86config.XF86SectionMissing

Like for you :)

Comment 11 Leon Stringer 2008-04-07 08:27:50 UTC
*** Bug 439873 has been marked as a duplicate of this bug. ***

Comment 12 Fred New 2008-04-07 10:44:33 UTC
Jesse's comment #8 seems to be on the mark.  If I add the following to
/etc/X11/xorg.conf, I no longer get any errors when I run system-config-keyboard:

To ServerLayout section, add

	InputDevice    "Keyboard0" "CoreKeyboard"

Create an InputDevice section like this.  (Look out, I am using an Estonian
keyboard.):

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "ee"
EndSection



Comment 13 Daniel Walsh 2008-04-08 12:20:57 UTC
*** Bug 403791 has been marked as a duplicate of this bug. ***

Comment 14 Jesse Keating 2008-04-09 18:36:52 UTC
This appears fixed in rawhide.

Comment 15 Fred New 2008-04-11 05:22:59 UTC
I think this bug was closed prematurely.  With
system-config-keyboard-1.2.14-2.fc9.noarch, I am still seeing:

$ system-config-keyboard 
Loading /lib/kbd/keymaps/i386/qwerty/et.map.gz
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 226, in _okClicked
    return self.apply(None, False)
  File "/usr/share/system-config-keyboard/keyboard_gui.py", line 117, in apply
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 34, in
modifyXconfig
    keyboard = xf86config.getCoreKeyboard(xconfig)
  File "/usr/lib/python2.5/site-packages/xf86config.py", line 177, in
getCoreKeyboard
    raise XF86SectionMissing("No CoreKeyboard InputDevice found in the layout")
xf86config.XF86SectionMissing
$

Comment 16 Jesse Keating 2008-04-11 11:55:22 UTC
hem maybe I had leftover settings. I will test a fresh install this morning.

Comment 17 Pierre-Yves 2008-04-11 11:58:46 UTC
Does not work me either on system-config-keyboard-1.2.14-2.fc9.noarch (I have
not seen any update on rawhide for this package...)


Comment 18 Lubomir Kundrak 2008-04-11 20:15:48 UTC
*** Bug 442092 has been marked as a duplicate of this bug. ***

Comment 19 Lubomir Kundrak 2008-04-11 20:25:23 UTC
*** Bug 439589 has been marked as a duplicate of this bug. ***

Comment 20 Lubomir Kundrak 2008-04-11 20:26:06 UTC
*** Bug 439640 has been marked as a duplicate of this bug. ***

Comment 21 Pierre-Yves 2008-04-12 13:19:08 UTC
I reopen this bug:
* It seems that the graphical interface is broken
* When I change the map of my keyboard it still does not save it (what it was
doing before)

[root@haar024 ~]# system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.
Loading /lib/kbd/keymaps/i386/qwerty/uk.map.gz
No protocol specified
Cannot open display ":0.0"
Parse error on line 14 of section InputDevice in file /etc/X11/xorg.conf
	This section must have an Identifier line.
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 78,
in <module>
    useTextMode()
  File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 38,
in useTextMode
    app = keyboard_tui.childWindow()
  File "/usr/share/system-config-keyboard/keyboard_tui.py", line 107, in __init__
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 39, in
modifyXconfig
    xconfig.comment = '# This configuration file was broken by
system-config-keyboard'
AttributeError: 'NoneType' object has no attribute 'comment'


Comment 22 Pierre-Yves 2008-04-12 13:20:12 UTC
I forget to precise:

# rpm -aq system-config-keyboard
system-config-keyboard-1.2.14-3.fc9.noarch


Comment 23 Lubomir Kundrak 2008-04-12 13:40:55 UTC
[root@haar024 ~]# system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.
Loading /lib/kbd/keymaps/i386/qwerty/uk.map.gz
No protocol specified
Cannot open display ":0.0"
Parse error on line 14 of section InputDevice in file /etc/X11/xorg.conf
	This section must have an Identifier line.

Seems like your xorg.conf is broken. Please attach it.

Comment 24 Pierre-Yves 2008-04-12 14:03:44 UTC
Created attachment 302215 [details]
Pingou's xorg.conf

Comment 25 Pierre-Yves 2008-04-12 14:04:09 UTC
There it is

Comment 26 Need Real Name 2008-04-12 14:46:17 UTC
almost works for me.. my delete key is still a printscreen key. page up/down are
still not working.

Comment 27 Lubomir Kundrak 2008-04-12 15:22:08 UTC
Whoops, me stupid me forgot to terminate a line correctly.

Comment 28 Need Real Name 2008-04-12 15:39:41 UTC
In relation to which comment?

Comment 29 Pierre-Yves 2008-04-12 15:52:38 UTC
I have tried 
# rpm -aq system-config-keyboard
system-config-keyboard-1.2.15-2.fc9.noarch

and I still end with :

# system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.
Loading /lib/kbd/keymaps/i386/qwerty/us-acentos.map.gz
No protocol specified
Cannot open display ":0.0"
Parse error on line 14 of section InputDevice in file /etc/X11/xorg.conf
	This section must have an Identifier line.
Traceback (most recent call last):
  File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 78,
in <module>
    useTextMode()
  File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 38,
in useTextMode
    app = keyboard_tui.childWindow()
  File "/usr/share/system-config-keyboard/keyboard_tui.py", line 108, in __init__
    keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
  File "/usr/share/system-config-keyboard/keyboard_backend.py", line 39, in
modifyXconfig
    xconfig.comment = "\n# This configuration file was broken by
system-config-keyboard\n"
AttributeError: 'NoneType' object has no attribute 'comment'


Comment 30 Lubomir Kundrak 2008-04-12 17:21:51 UTC
(In reply to comment #28)
> In relation to which comment?

Sorry, I ignored your one, as it was not really relevant to this problem, and
probably even to this package.

(In reply to comment #29)
> I have tried 
> # rpm -aq system-config-keyboard
> system-config-keyboard-1.2.15-2.fc9.noarch
> 
> and I still end with :
> 
> # system-config-keyboard 
> No protocol specified
> Starting graphical mode failed.  Starting text mode instead.
> Loading /lib/kbd/keymaps/i386/qwerty/us-acentos.map.gz
> No protocol specified
> Cannot open display ":0.0"
> Parse error on line 14 of section InputDevice in file /etc/X11/xorg.conf
> 	This section must have an Identifier line.
> Traceback (most recent call last):
>   File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 78,
> in <module>
>     useTextMode()
>   File "/usr/share/system-config-keyboard/system-config-keyboard.py", line 38,
> in useTextMode
>     app = keyboard_tui.childWindow()
>   File "/usr/share/system-config-keyboard/keyboard_tui.py", line 108, in __init__
>     keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
>   File "/usr/share/system-config-keyboard/keyboard_backend.py", line 39, in
> modifyXconfig
>     xconfig.comment = "\n# This configuration file was broken by
> system-config-keyboard\n"
> AttributeError: 'NoneType' object has no attribute 'comment'
> 

Yep, you have to fix your xorg.conf by hand -- I am very sorry. Add a line break
between the comment and "Identifier" keyword.

# Keyboard added by system-config-keyboard	Identifier
                                           ^^^^
                                           here

Comment 31 Pierre-Yves 2008-04-12 17:33:16 UTC
I have changed the xorg.conf but it is still only half working:


There is the output for 2 test to apply 2 different maps none of them worked

$ system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.
Loading /lib/kbd/keymaps/i386/azerty/fr-latin9.map.gz
assuming iso-8859-1 cedilla
assuming iso-8859-1 acute
assuming iso-8859-1 diaeresis
assuming iso-8859-1 brokenbar
assuming iso-8859-1 threequarters
assuming iso-8859-1 currency
assuming iso-8859-1 onehalf
assuming iso-8859-1 onequarter
No protocol specified
Cannot open display ":0.0"

$ system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.
Loading /lib/kbd/keymaps/i386/qwerty/us-acentos.map.gz
No protocol specified

There is the xorg.conf

# Keyboard added by system-config-keyboard
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "fr"
        Option      "XkbVariant" "latin9"



Comment 32 Lubomir Kundrak 2008-04-12 18:19:37 UTC
(In reply to comment #31)
> I have changed the xorg.conf but it is still only half working:
> 
> 
> There is the output for 2 test to apply 2 different maps none of them worked
> 
> $ system-config-keyboard 

> No protocol specified
> Cannot open display ":0.0"

This is due to another problem (also seems to happen to other consolehelper
programs). Try running it as root to get graphical interface (you will probably
have to do "xhost +" before and "xhost -" to allow s-c-k to connect to your
display due to a problem referred to above.)

When running in text mode, s-c-k does not change X11 keyboard.

Thanks!

Comment 33 Need Real Name 2008-04-12 23:34:39 UTC
This bug isn't yet fixed - changes are lost across reboots.

Comment 34 Lubomir Kundrak 2008-04-13 08:53:13 UTC
lsof: No, they are not. Prove. :)
Seriously -- please include the most basic information:

1.) Do you use text version?
1.1) If yes, please show me your /etc/sysconfig/keyboard before and after changes

2.) Do you use graphical version?
2.1) Please attach your /etc/X11/xorg.conf before and after changes

3.) Which keyboard type did you change to?

4.) Please include any python backtraces from exceptions as well as any error
output from s-c-k.

Thanks!

Comment 35 Pierre-Yves 2008-04-13 15:09:12 UTC
Ok I finally managed to get my us_international keyboard.

I had to run s-c-k (on texte mode, graphical mode is still broken) I chose my
keyboard and while rebooting after I had the correct layout.

But does not solve the fact that s-c-k does not do its job yet :-/

Comment 36 Lubomir Kundrak 2008-04-13 16:13:29 UTC
Pierre: Its job is primitive switching of keyboards and it does that pretty
well. Do not use it if you don't like it -- there are better tools around.
gnome-keyboard-properties.

Comment 37 Pierre-Yves 2008-04-13 16:21:16 UTC
Lubomir,

Please do not take offence of what I said, I did not mean that I do not like it
neither that I will not use it. I found a way to get my keyboard as I wanted and
for that thanks a lot for the help you gave me :)

It is just that such error would not be nice for a basic end user, but I agree
it does its job and that's all we want..

#  system-config-keyboard 
No protocol specified
Starting graphical mode failed.  Starting text mode instead.

Sorry if you took it wrong was not my intention

Comment 38 Lubomir Kundrak 2008-04-13 16:32:21 UTC
(In reply to comment #37)
> Lubomir,
> 
> Please do not take offence of what I said, I did not mean that I do not like it
> neither that I will not use it. I found a way to get my keyboard as I wanted and
> for that thanks a lot for the help you gave me :)

Honestly, I do not like it myself, and basically noone should really have a
reason to like it since there are much better tools around :)

> It is just that such error would not be nice for a basic end user, but I agree
> it does its job and that's all we want..
> 
> #  system-config-keyboard 
> No protocol specified
> Starting graphical mode failed.  Starting text mode instead.

As I said, this is not s-c-k's bug. It affects pretty much everything that uses
consolehelper, and I think this is known and being fixed (unless I am messing
this with something else I heard on #fedora-devel) :}

> Sorry if you took it wrong was not my intention

I hope I did not :)

Comment 39 Need Real Name 2008-04-13 17:24:15 UTC
Gnome keyboard properties doesn't work. That's why I'm using s-c-k.