Home_greyopenFATE - openSUSE feature tracking > #309487
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

Clean out X11 keyboard configuration in YaST

Feature state

openSUSE Distribution
Duplicate of #318355
Status: Done
openSUSE-11.4
Rejected Information

Description

Currently, 'yast2 keyboard' is using kind of strange way of determining which X11 keyboard layout to use.

There's a map of internal YaST keyboard names, to which the list of kbd console maps is mapped (like, us.map.gz). Such console map is taken as a parameter for calling /usr/sbin/xkbctrl script, which returns the informations about corresponding X11 keyboard layout (usable for setxkbmap).

One problem is that not for all languages, there's a sense to have console map, and because of this situation in YaST, we are using files like ar.map.gz, which are only links to us.map.gz.

Other part is that the list of X11 keyboard layouts is part of sax2-tools package which we probably want to drop.

New solution would mean that YaST has all the information currently provided by xkbctrl: either by building its own data structure (if there's no other application using it), or using a better way to get the data YaST needs to know.

Relations

  • Duplicate of feature #318355:

References

https://bugzilla.novell.com/show_bug.cgi?id=603950

https://bugzilla.novell.com/show_bug.cgi?id=601587

https://bugzilla.novell.com/show_bug.cgi?id=725468

Discussion


icons/user_comment.png J. S. wrote: (6 years ago)

Stefan, where does YaST get the info about which setxkbmap command to call?

icons/user_comment.png S. D. wrote: (6 years ago)

The information in /etc/X11/xdm/Keyboard.map can be used for a new start.

icons/user_comment.png J. S. wrote: (6 years ago)

BTW, don't you know how other distros are doing it? Is there any common mapping from locale (de_DE) to console key map and X11 keyboard map?

Actually, if we'd create some new file for it, I'd still more like to have it not inside YaST filesystem subtree, so it is easily available to potential other applications.

icons/user_comment.png S. D. wrote: (6 years ago)

I don't know how other distros handle this. You would like to figure it out? Please go ahead.
I always thought YaST is our config tool.

I would go for a config file/configuration, which is read by the usual desktops like KDE, Gnome, Xfce, etc to use this keyboard setting by default (global keyboard configuration) unless the user choses a different one.
And that way finally get rid of this /etc/X11/xorg.conf.d/90-keytable.conf snippet created by /etc/X11/xdm/keytable. And yes, this will no longer cover the twm/fvwm2 user.

icons/user_comment.png J. S. wrote: (6 years ago)

1. So, YaST should offer all X11 layouts from start: where can I find the list of them? I assume there's a list, which is used buy KDE/GNOME tools. I think we should not use only the subset from /etc/X11/xdm/Keyboard.map.

2. YaST needs to determine which layout to used as defalt, based on user language during the installation. But this could stay YaST internal, as it is relevant to installation only.

3. Based on selected X11 layout, YaST should set also console keyboard. The mapping of X11-> console could be taken from current /etc/X11/xdm/Keyboard.map (it does not cover all X11 layouts, but that is fine) and could probably stay internal in YaST. Or do you think it makes sense to make it public for any other (desktop) applications?

4. The variable in KEYTABLE in /etc/sysconfig/keyboard could probably stay with current meaning.

5. We probably need to save X11 keyboard information saved somewhere (esp. during installation, when setxkbmap call is not available), and this info would be read by desktops to apply the layout, right? Seems like such config should contain all options needed for setxkbmap so other conversions are not needed. What do you think, could use /etc/sysconfig/keyboard for that? With the values like X11_LAYOUT, X11_VARIANT etc.?

icons/user_comment.png S. D. wrote: (6 years ago)

@1: I'm not sure whether KDE/GNOME tools use a static list for this or if they
figure this out on-the-fly via libxkb and how. Please ask our KDE/GNOME developers. They should know better than me.
@2: I agree. Default should depend on the language. Unless we can detect
the keyboard language ...
@3: I agree. I don't think desktop applications are interested in Linux console keyboard layout. :-)
@4: Sure. I agree. This variable can stay with the current meaning.

@5: Basically I agree, but I wouldn't split this into several options (of course YaST internal you do this). Just all options for the setxkbmap command
in one string.

icons/user_comment.png J. S. wrote: (6 years ago)

Tested Fedora 16: installer offers more layouts than we do, but I think not all of X11 available. Console keyboard does not seem to be configured.
/etc/sysconfig/keyboard contains the keys KEYTABLE, MODEL,LAYOUT and VARIANT, which is close to our proposal.

icons/user_comment.png J. S. wrote: (6 years ago)

Ubuntu installer seems to offer full X11 layouts support. After installation, console keyboard is probably set as well, but not console font, which results in unusable situation (tested CZ layout)

icons/user_comment.png J. S. wrote: (6 years ago)

Jiri, what is your point of view?

icons/user_comment.png J. S. wrote: (6 years ago)

I don't really see the value of this feature. I understand that there is a burden of maintaining a conversion table between console and X11 layouts, but I don't see the alternative (moving it between packages does not really help).

How often are we asked to add another layout?

icons/user_comment.png D. H. wrote: (5 years ago)

To answer a question above, KDE/GNOME use /usr/share/X11/xkb/rules/base.xml to find keyboards, layouts and variants.
Jiri, maybe you're not asked to add layouts very often (can you add Colemak please?), but it makes using anything not listed a pain. I'm using a custom xkb layout (no console equivalent) and can set it fine using setxkbmap but not on X-server start.

To add a little perspective, debian has a file at /etc/default/keyboard controlling the default X11 layout. I think they then do the opposite to you and generate/find a console layout based on the xkb layout. You'd have to ask someone else for the details.

icons/user_comment.png S. D. wrote: (2 years ago)

Should be addressed together with FATE#318355 (duplicate).

Last change: 6 months ago
Voting
Score: 4
  • Negative: 2
  • Neutral: 2
  • Positive: 6
Tags
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint