Wrong keyboard in X after install (abnt2 versus us_intl for Brazilian Portuguese)

Bug #8698 reported by Paulo J. S. Silva
16
Affects Status Importance Assigned to Milestone
xfree86 (Ubuntu)
Fix Released
Medium
Fabio Massimo Di Nitto

Bug Description

I have installed ubuntu using the daily cd from 09/30. At installation, I have
picked Brazilian Portuguese as language and US International (with deadkeys) as
keyboard. Keyboard in console is configured fine but it is wrong in X. The X
configuration does not use the keyboard information, it only uses the language
setting and hence chooses the abnt2 keyboard for the configuration. Such
keyboard setup is very common in Brazil (almost as common as ABNT2).

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Hi,
   even tho i perfectly understand the problem, the informatio that the
installer passes around
are not enough to determine the X keyboard layout. On the otherside other
brazilians people
have been requesting the ABNT2 since, according to them it is more common that
us_intl.
This puts me in a position that I simply can't solve without asking a question
to the users.

Matt, what do you suggest? imho we can prompt for the keyboard layout when the
LANG setting
is set to brazialian*. On the otherside it will reintroduce a question and an
exception in
the code.

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

Can't you read the keyboard information used to set up the console keymap?
The installer already asks for the keyboard layout for the console. So
the installer already acknowledges that the language itself is not enough
to deduce the right keyboard layout.

If this is not possible, certainly this should be solved for the next
release. I would also suggest to add an "errata" explaning how to configure
the X keyboard if it does not match the language. I believe that this would
be good not only for Brazilians, but for other nationalities too. For example,
any non-american who bought a American laptop could benefit. (Actually the
computer where I found the problem is a laptop, we can't just change the
keyboard in a laptop :-( )

Revision history for this message
Matt Zimmerman (mdz) wrote :

Paulo, is the difference between the keyboard layouts large enough that you are
unable to login? If you can login, the layout can be changed via the keyboard
preferences.

If it is impossible to login, we may have no choice but to ask a question, but
this should be avoided if at all possible. This is something that we'll be
improving for Hoary, so the question is whether or not it is an urgent bug for
Warty. Currently, it does not seem so.

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

I can login. However I am not sure if everyone will. I don't have
very weird characers in my password. If I had characters like
; or [ I would be in trouble. The problem could also be
worse for someone coming from a language with a more weird
keyboard layout (remember, this problem is not only pt_BR
specific as I explained above).

I had tried to setup the keyboard using the gnome preferences.
I had selcted the "Generic 104-key PC" model. When I try to select
the "US English w/ deadkeys" layout I get an error dialog like
this:

--- Error message ---

Error activating XKB configuration.
Probably internal X server problem.

X server version data:
The XFree86 Project, Inc
40300001
You are using XFree 4.3.0.
There are known problems with complex XKB configurations.
Try using simpler configuration or taking more fresh version of XFree software.
If you report this situation as a bug, please include:
- The result of xprop -root | grep XKB
- The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/xkb

--- Error message ---

If I run the above commands I get

--- Commands output ---

pjssilva@leia:~$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "xfree86", "abnt2", "br", "abnt2", ""
_XKB_RULES_NAMES(STRING) = "xfree86", "pc104", "br", "abnt2", ""

pjssilva@leia:~$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/xkb
 layouts = [br abnt2,us_intl]
 model = pc104
 overrideSettings = false
 options = [grp grp:alts_toggle]
 update_handlers = []

--- end output ---

I only get this message if I select "US English w/ deadkeys" layout. If I select
any other
layout like plain "US English" or "US English w/ ISO9995-3" (which does not have
deadkeys
here) or "Latin America" I don't get an error message. I have also tested the
above in my
Debian unstable dektop at home and I get the same error.

I am now running my ubuntu system with plain English and I can't use accents :-(

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #4)
> I had tried to setup the keyboard using the gnome preferences.
> I had selcted the "Generic 104-key PC" model. When I try to select
> the "US English w/ deadkeys" layout I get an error dialog like
> this:
>
> --- Error message ---
>
> Error activating XKB configuration.
> Probably internal X server problem.

Bug #7848

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

(In reply to comment #2)
> Can't you read the keyboard information used to set up the console keymap?

Unfortunatly not. The information in console keymap are way different from the ones
required by X. There is no relation between them.

I guess we will have to ask the question.

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

(In reply to comment #6)
> (In reply to comment #2)
> > Can't you read the keyboard information used to set up the console keymap?
>
> Unfortunatly not. The information in console keymap are way different from the
ones
> required by X. There is no relation between them.
>
> I guess we will have to ask the question.

I don't know about other countries, but in Brazil there are two usual setups:

1) People using the Brazilian keyboard (ABNT2)
2) People using American keyboard (with deadkeys)

If somebody is in group (1), he'll ansewer the console keyboard question with
"Português Brasileiro (layout ABNT2)". In this case the current keyboard setup
for X that the installer is using is OK.

If the person is in group (2), he'll answer the console keyboard question with
"Português Brasileiro (layout Americano)". In this case the XF86Config-4 keyboard
section should have:

    Option "Xkbrules" "xfree86"
    Option "Xkbmodel" "pc105" (or pc104)
    Option "Xkblayout" "us_intl"

This works if I do a "dpkg-reconfigure xserver-xfree86" to setup my keyboard.
(Actually it is broken right now due to Bug #7848)

Hence, for pt_BR, the console keyboard information is enough. However I
understant that this may not be the case for all languages.

Finally I suggest you to use a check box in the installer screen that
queries the system language:

[x] Use standard keyboard model

The questions on the keyboards model for console and/or X should
only bother users who "un-check" the check box. This would make the
install experience smoother for most users.

These are suggestions only for the next release.

Thanks for Ubuntu and kkep on the good work.

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 8740 has been marked as a duplicate of this bug. ***

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

This problem should be fixed with Xfre86 -6ubuntu23 upload. The packages will be
available on the mirrors in a few hours.

Fabio

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.