Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just written an alternative keyboard file to give me a different set of AltGr combinations for special use. The problem is installing it.
In Gnome, the menu system-preferences-keyboard-layouts allows one to select up to four keyboard layouts, but it does not list the one I've made. My new layout is in /usr/share/X11/xkb/symbols/, and I've entered it in both /usr/share/X11/xkb/rules/base.xml and /usr/share/X11/xkb/rules/base.lst. Evidently Gnome uses its own built-in list of languages and ignores anything else.
So, I need to do it manually. But where is the list of installed keymaps kept? I've looked in obvious (and unlikely) places, but it's the old needle in a haystack situation. /etc/X11/xorg.conf only lists the default keyboard and there's nothing in any ~/. file.
Of course, I could cheat and call my new layout with a name that Gnome can recognise, like Bhutanese, but it would be nice to know how it works.
If gnome uses the X server keyboard layouts, then you should read these files, they may give you hints on how to set it up.
/etc/X11/xkb/README.config
/etc/X11/xkb/compiled/README
This is one of those occasions when one wishes for a little standardisation.
On Fedora, /etc/X11 does not contain a /xkb directory. There is a directory /usr/share/X11/xkb, but it doesn't have /compiled or README.config
A search for /compiled leads to /var/lib/xkb/compiled/README which was no help at all. Needless to say, I am not going to search for all the files called README!
My bodge idea doesn't work, either. I tried calling my special keymap Azerbaijani, but Gnome saw through my deception and ignored it.
setxkbmap newmap sets newmap as the current keyboard (try man setxkbmap). However, it also wipes any xmodmap and xbindkeys definitions. If you have a modern multi-media keyboard and have carefully set up the www and play/pause buttons, setxkbmap means they all have to be reset.
I know some people feel clever or virtuous when using the command line rather than the desktop, but the facilities in Gnome are put there for a purpose. The old unix utilities are often incompatible with modern features, as I've found in other contexts.
At setxkbmap did reveal the probable problem, reporting an error in loading the new keyboard. If I can find that, I'll have another go at passing it off as Azerbaijani.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.