Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 80993 - redhat-config-xfree86 trips on a keyboard
redhat-config-xfree86 trips on a keyboard
Product: Red Hat Public Beta
Classification: Retired
Component: redhat-config-xfree86 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
Depends On:
Blocks: 79579
  Show dependency treegraph
Reported: 2003-01-02 22:29 EST by Michal Jaegermann
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-15 10:05:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2003-01-02 22:29:16 EST
Description of problem:

An attempt to use redhat-config-xfree86 results in the following traceback:

Traceback (most recent call last):
  File "/usr/share/redhat-config-xfree86/xconf.py", line 1091, in ?
    xconfig = generate_xconfig(hardware_state)
  File "/usr/share/redhat-config-xfree86/xconf.py", line 837, in generate_xconfig
    get_option(corekb, "XkbRules").val = keyboard["rules"]
  File "/usr/lib/python2.2/site-packages/rhpl/keyboard.py", line 76, in __getitem__
    raise KeyError, "No such keyboard type %s" % (table,)
KeyError: No such keyboard type emacs2

It looks like that this Python code is trying to find a keyboard type
in a wrong place, i.e. /etc/sysconfig/keyboard which holds a configuration
for a _console_ keyboard, or at least is not dealing in a reasonable manner
with keyboard types which do exist.
Comment 1 Brent Fox 2003-01-03 16:12:35 EST
Can you attach your /etc/sysconfig/keyboard file?
Comment 2 Brent Fox 2003-01-03 16:47:44 EST
Nevermind, I've worked out a fix.  With redhat-config-xfree86-0.7.0-6, we
default to a US keymap if the keyboard in /etc/sysconfig/keyboard is not in the
list of keyboards that rhpl knows about.  This avoids the traceback and should
at least get X up and running.  If the user doesn't want to use a US keymap,
they can then run redhat-config-keyboard and select another keymap.

Note that to get a keyboard in /etc/sysconfig/keyboard file that is not in
rhpl's keyboard list, the user would have to use a config tool other than
redhat-config-keyboard.  (i.e. emacs2 keyboard is a valid console keymap but
redhat-config-keyboard doesn't offer emacs2 as a choice since there's no X
equivalent keymap)

QA, please verify.
Comment 3 Michal Jaegermann 2003-01-03 18:29:02 EST
Here is my 'keyboard' file in its full glory


and KEYTABLE may hold any of 121 map names from /lib/kbd/keymaps/i386/.

Frankly I was thinking rather in terms of possible mapping of these names
into something acceptable to xfree86 maybe somewhat less crude than everything
we do not know into "us".  Azerty keyboard "be-latin1", assuming that not
recognized by X, likely does not work very well as "us".  It seems that
for most names a reasonable mapping should be "obvious" and leftovers
could be dumped on "us".  What is your opinion?
Comment 4 Brent Fox 2003-01-07 14:11:48 EST
I agree that this is not the most elegant solution.  However, I have more
important bugs from Phoebe that need my attention.  At least this solution
avoids the traceback, which was my main concern.

As I said, the user has to have done some manual changes to get a keyboard in
/etc/sysconfig/keyboard that rhpl's keyboard list doesn't know about. 
'be-latin1', by the way, is in rhpl's keyboard list, so that should work just
fine, but you are right in that there are probably other keymaps that wouldn't
be properly handled by this fix.  But again, getting a working XF86Config file
is the important thing and the user can then run redhat-config-keyboard after that.
Comment 5 Jay Turner 2003-01-15 10:05:43 EST
Fix confirmed with redhat-config-xfree86-0.7.1-3.

Note You need to log in before you can comment on or make changes to this bug.