GNOME Bugzilla – Bug 137294
No Sun Type 6 keyboard offered in "Layouts"
Last modified: 2006-11-06 21:02:36 UTC
Distribution: Debian testing/unstable Package: control-center Severity: normal Version: GNOME2.5.90 unspecified Gnome-Distributor: GNOME.Org Synopsis: No Sun Type 6 keyboard offered in "Layouts" Bugzilla-Product: control-center Bugzilla-Component: keyboard Bugzilla-Version: unspecified Description: Description of Problem: I want to select my Sun Type 6 keyboard, but it's not in the list of keyboards. Steps to reproduce the problem: 1. Open Applications | Desktop Preferences | Keyboard > Tab "Layouts", select "Keyboard model:" 2. --> no Sun keybard there Additional Information: This is with a Gnome updated with "cvsgnome update" from a few minutes ago. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2004-03-15 16:39 ------- Reassigning to the default owner of the component, control-center-maint@bugzilla.gnome.org.
The lyaouts are supplied by the X server, not gnome.
Some additional info for reference (just my assumptions) - this is with Debian unstable's XFree86 Version 4.3.0.1 (Debian 4.3.0-5 20040305041558 joshk@triplehelix.org): Gnome seems to look at /etc/X11/xkb/rules/xfree86.xml (corresponds to /etc/X11/xkb/rules/xfree86.lst). Now, Sun keyboards are not listed in xfree86.{xml|lst}, but in /etc/X11/xkb/rules/sun.lst - no sun.xml (not sure if Gnome would read it if it existed).
Ok, first please could someone create sun.xml?:) I will think of it. Probably I will do - not create sun.xml but put options from sun.lst to xfree86.xml. There should be ONE directory on the server. That's for sure. But it will take some time. Actually, you can leave this bug open - just for me. It is mine, not gnome's one:)
I'll hopefully get time to play with this on the weekend. FWIW, not that there is also an sgi.lst file without a corresponding sgi.xml file.
I am looking at it right now. For sure, libxklavier is NOT READY for multiple source of rules. So, first we'll face API/ABI change. But that's not the end of the story. The WORST part of it is that sun/sgi rules still use old non-"multiple-layouts"-enabled approach - so layouts are not not mergeable. So EVEN if we create sun.xml and sgi.xml, EVEN if libxklavier would be able to them - the proper layout management is not going to work properly. Also, they have pretty much out-of-date list of available options - well, not critical but still annoyance In a word, the only way I see to fix things for real is to perform real revolution in xfree xkb configuration repository. No ways around. Sorry for that. I'm afraid, till that happens, the bug is going to be open. Continue thinking about it...
Any news on this issue?
I'm using Debian experimental's Gnome right now, and Gnome gnome-keyboard-layout (gkb 2.8.2) offers me a Sun Type 5 keyboard (I have a type 6, but these are basically the same I think). I haven't really played with it to see how it matches my actual keys. However, I know there is both a "Type 6 US" and a "Type 6 US/Unix" (the one I have, Escape in the number row, Control next to A, and Backspace directly above Return), not sure how I would select between these two? Also, I am a bit confused how gnome-keyboard-layout is related to gnome-keyboard-properties - only the latter one seems to be in the menus?
Ghm. Somehow gnome-keyboard-layout got its way into gnome 2.8.2 - while it actually is a part of the old gkb. People using XKB should use gnome-keyboard-properties only. Regarding the XML file to use - it is the build-time option of the libxklavier library. It is usually either xfree86.xml or xorg.xml or base.xml - so you can just replace this file with the one containing descriptions of the Sun keyboards.
Colin, did you try to replace xml description with the Sun-oriented one (there is no such a thing, you have to hack it yourself, sorry)?
No, I did not. Maybe I'll get to it next week - not possible earlier, sorry. Let me get this straight: I should find out whether libxklavier is using xfree86.xml or xorg.xml or base.xml, and then patch the right file with Sun definitions? BTW, I have switched to Ubuntu Hoary in the meantime, so I should be pretty up-to-date with the Gnome stuff.
Colin: Actually, since Sun have separate file with the rules (X11/lib/xkb/rules/sun), I'd prefer the separate XML file for the sun definitions. Same about SGI, actually. The name of the file is defined by the directive "XkbRules" in XF86Config (xorg.conf).
Created attachment 38016 [details] sun.xml
I'm getting more confused by the minute. First, if I have separate xml files, doesn't that prevent me from switching between a PC keyboard and a Sun keyboard in Gnome? (this is not a theoretical setup, I have both a Sun Type 6 and a PC keyboard connected at the same time) Then... I don't understand the mapping between the lst files (not used anymore?) and the xml files: the former allowed to combine every model with every layout and every variant and every option (even if it made no sense), right? The sun.lst file has type5 and type5_unix - but only type6. However, I know there is both a "Type 6 US" and a "Type 6 US/Unix". And there e.g. type6 and type6_euro - what if I select type6 with layout de, or type6_euro with layout ca? Anyway, I created a sun.xml from xorg.xml as best as I could - I didn't test it yet. It is missing the following layouts: gb, intl, th. I removed options that referenced Win and Menu keys and left the others, even though they have no equivalent in the sun.lst file.
Okay, I see that "_euro" means "with Euro key". Found that in http://ftp.rutgers.edu/pub/gentoo/x11-libs/libxklavier/files/sun.xml - that file doesn't seem too complete, don't know how it came into existance?
Created attachment 38023 [details] Fixed sun.xml with some additional German translation. Okay, the previous file had XML errors in it. I can actually use this file now.
While the 2nd file seems to work, I still get (2 times each time) the dialog with the text Error activating XKB configuration. It can happen under various circumstances: ... whenever I remove or add a new layout. Also, I cannot add more than one layout, I have to remove the one I have before I can add a new one.
any news on this one? colin, what's the state of this? still an issue nowadays?
Sorry Colin, I did not reply for some while... For some reason this bug got lost from my radars (and thanks to Andre for getting it back). First of all, you are right - X can only deal with one set of rules at a time. setxkbmap can switch configuration (there is -rules) parameter - but GNOME does not have this feature, it uses whatever rulese is in xorg.conf. So if you are using ruleset 'sun' - you cannot switch. That is one of the reasons I would really love to get rid of all rulesets but the basic one. As a maintainer of xkeyboard-config, I could accept your sun.xml file - but it has to be renamed to sun.xml.in - and all translations removed. Could you please open this bug in fd.o bugzilla and attach your file there? Because here is it just NOTGNOME thingie. Unless you insist on ability to switch between rulesets (which is a bit PITA which I am not sure worth the effort). Really sorry again.
Anyway, FWIW I extracted sun.xml.in into xkeyboard-config. All further activites I'd advise to perform in fd.o bugzilla. Thanks again for your help.