Bug 680990

Summary: Unnecessarily limited set of keyboard layouts available for usage on console
Product: [Fedora] Fedora Reporter: Jean-François Fortin Tam <nekohayo>
Component: kbdAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aalam, apal.marlak, cfergeau, contact, duffy, i18n-bugs, john, kay, kraymond, lkundrak, lpoetter, madko, mail, pbrobinson, ploum, rstrode, sebastien.willmann, vcrhonek, vpodzime, zali
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-19 10:31:08 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 680989    
Bug Blocks: 668084    

Description Jean-François Fortin Tam 2011-02-28 12:37:51 EST
It seems there is no keyboard layout for Canadian French Dvorak in kbd or system-config-keyboard. However, X provides such a layout in /usr/share/X11/xkb/symbols/ca

As I understand it, this depends on Bug 680989 and blocks Bug 668084.
Comment 1 Jean-François Fortin Tam 2011-04-25 14:39:29 EDT
The keymap is now available in Rawhide - kbd-1.15.2-3.fc16
What further actions are required for system-config-keyboard and anaconda?
Comment 2 naraesk 2011-10-09 18:18:32 EDT
I miss the neo 2layout. It is a  variant of the german layount and provided in /usr/share/X11/xkb/symbols/de
Comment 3 Lionel Dricot 2011-12-04 07:07:41 EST
And I miss the French-Dvorak Bépo.

I don't understand that system-config-keyboard has a different list of layouts than the one provided by X.

This is pure useless duplicate effort. As soon as X is installed, all the available layouts should be listed in system-config-keyboard.
Comment 4 Lionel Dricot 2012-01-08 09:40:37 EST
I must add that manually fixing the system keyboard is *not* an option because it is reset by the system with each upgrade. This bug is thus pretty annoying for people not using one of the selected keyboard as it makes GDM and the console unusable and with no viable workaround.
Comment 5 Lionel Dricot 2012-01-08 09:44:27 EST
Can the title of this bug be changed to "Multiple existing X.org keyboard layouts cannot be set as system layout"? The scope of this bug is obviously broader than Canadian Dvorak.
Comment 6 Jean-François Fortin Tam 2012-01-08 10:05:42 EST
That is bug #712877 instead.
Comment 7 Kevin Raymond 2012-01-09 17:13:33 EST
bépo user here…
Comment 8 apal.marlak 2012-05-14 09:53:03 EDT
Another bépo user here, I'll have to stick to Ubuntu as long as Fedora doesn't offer me native bépo support.
Comment 9 Máirín Duffy 2012-06-05 13:57:42 EDT
Moving this bug to kbd as I believe this is the more appropriate component. Here is nim-nim's summary of the issue from related bug 668084:

"Basically, Debian has a nice system where xkb-config layouts (used by xorg) are dynamically transformed into console layouts, while Fedora uses two different layout databases, which are not synced

"No one really updates kbd layouts anymore, since it's obvious to layout authors the Debian solution is the right solution, and once Ubuntu inherited it from Debian it was game over for other distributions and time to play catch-up if they wanted to care about i18n and desktop.

"The problem has been known for years and the number of people affected has only grown with time and kbd abandonment. And yes I realise Debian's dynamic mapping is harder to code than using a static xkb-config/kbd table, or dumping this table and only supporting the layouts that appear under the same name in both systems, but the other solutions only work if layout authors bother to write two layouts (one for xkb-config and one for kbd) each time they do a change, and they've voted with their feet a long time ago (and additionally even when one did this it took months to get add a new line in the mapping table used by anaconda – great way to make people not bother)

"And I've not seen any of the people advocating against the Debian solution volunteer to write all the kbd tables the alternative required either."

Can we follow Debian's lead here and set up dynamic mapping so we can support our users on the console?
Comment 10 Vitezslav Crhonek 2012-06-06 07:18:44 EDT
(In reply to comment #9)
> Moving this bug to kbd as I believe this is the more appropriate component.
> Here is nim-nim's summary of the issue from related bug 668084:
> 
> "Basically, Debian has a nice system where xkb-config layouts (used by xorg)
> are dynamically transformed into console layouts, while Fedora uses two
> different layout databases, which are not synced
> 

And this is done within kbd package? Or there's some separate tool for it? I don't use Debian/Ubuntu, so I don't know the system. Are there any links, where this is described (googling didn't help)?

> "No one really updates kbd layouts anymore, since it's obvious to layout
> authors the Debian solution is the right solution, and once Ubuntu inherited
> it from Debian it was game over for other distributions and time to play
> catch-up if they wanted to care about i18n and desktop.
> 
> "The problem has been known for years and the number of people affected has
> only grown with time and kbd abandonment. And yes I realise Debian's dynamic
> mapping is harder to code than using a static xkb-config/kbd table, or
> dumping this table and only supporting the layouts that appear under the
> same name in both systems, but the other solutions only work if layout
> authors bother to write two layouts (one for xkb-config and one for kbd)
> each time they do a change, and they've voted with their feet a long time
> ago (and additionally even when one did this it took months to get add a new
> line in the mapping table used by anaconda – great way to make people not
> bother)
> 
> "And I've not seen any of the people advocating against the Debian solution
> volunteer to write all the kbd tables the alternative required either."
> 
> Can we follow Debian's lead here and set up dynamic mapping so we can
> support our users on the console?
Comment 11 Máirín Duffy 2012-06-06 10:09:29 EDT
Let's NEEDINFO nim-nim :)
Comment 12 Nicolas Mailhot 2012-06-06 12:54:05 EDT
http://dev.man-online.org/man1/ckbcomp/
http://www.kaufmann.no/roland/dvorak/linux.html

(found via 30s googling  of 'debian console xkeyboard-config', never used those myself)
Comment 13 Vitezslav Crhonek 2012-06-07 07:51:22 EDT
(In reply to comment #12)
> http://dev.man-online.org/man1/ckbcomp/
> http://www.kaufmann.no/roland/dvorak/linux.html
> 
> (found via 30s googling  of 'debian console xkeyboard-config', never used
> those myself)

Thanks!

So this functionality is provided in console-setup package:
http://packages.debian.org/sid/console-setup

I'll take a look at it...
Comment 14 Vitezslav Crhonek 2012-06-12 06:57:37 EDT
So I investigated the console-setup tarball and it's basically a layer above kbd.

I created test SRPM, you can grab it here:
http://vcrhonek.fedorapeople.org/console-setup/

The usage is quite simple, let's say you want to have 'fr-dvorak' layout from '/usr/share/X11/xkb/symbols/ca' (from 'xkeyboard-config' package). Edit '/usr/local/etc/default/keyboard':

# cat /usr/local/etc/default/keyboard
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL=pc105
XKBLAYOUT=ca
XKBVARIANT=fr-dvorak
XKBOPTIONS=

BACKSPACE=guess

And then run:
# setupcon -k

That's it. It's also possible to play with fonts etc. see the documentation and the man pages.

I think it will be really useful to have console-setup in Fedora. system-config-keyboard and anaconda can use it. No change is necessary in the kbd package.
Comment 15 Máirín Duffy 2012-06-12 08:04:28 EDT
Wow, Vitezslav, that is awesome!!! Can this make it into F18 do you think or would it need some kind of FESCO okay?

Also! The following folks would probably need to know about it since they maintain hardcoded lists of layouts now -

Lennart (For systemd)
Zeeshan Ali (for boxes / spice)
Vratislav Podzimek and Chris Lumens on the Anaconda team (although the UI rewrite might do away with their hardcoded-list they will probably like to know)

(I would add them to the CC now but I have to run!)
Comment 16 Vratislav Podzimek 2012-06-13 03:46:48 EDT
(In reply to comment #15)
> Wow, Vitezslav, that is awesome!!! Can this make it into F18 do you think or
> would it need some kind of FESCO okay?
> 
> Also! The following folks would probably need to know about it since they
> maintain hardcoded lists of layouts now -
> 
> Lennart (For systemd)
> Zeeshan Ali (for boxes / spice)
> Vratislav Podzimek and Chris Lumens on the Anaconda team (although the UI
> rewrite might do away with their hardcoded-list they will probably like to
> know)
My intention is to switch from our hardcoded-list to using systemd-localed for setting console layout. So once this daemon uses the console-setup, additional layouts should also work in the Anaconda.
Comment 17 Vitezslav Crhonek 2012-06-20 09:24:34 EDT
I created Review Request for console-tools:

https://bugzilla.redhat.com/show_bug.cgi?id=833855
Comment 18 Vitezslav Crhonek 2012-06-20 09:25:33 EDT
(In reply to comment #17)
> I created Review Request for console-tools:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=833855

Sorry, I meant console-setup of course.
Comment 19 Vitezslav Crhonek 2012-07-03 07:39:03 EDT
I created bug for tracking console-setup/systemd integration:

https://bugzilla.redhat.com/show_bug.cgi?id=837292
Comment 20 Vitezslav Crhonek 2013-02-19 10:31:08 EST
I'm closing this bug - console-setup package is available in Fedora for some time, so there's not "limited set of keyboard layouts" available anymore.

The story continues in bz837292 with more system wide changes.