MountainX, you don't need sudo in /etc/rc.local. It runs as root on bootup, like all init scripts.
Are you sure your loadkeys method even works? loadkeys is a totally different way to change your keymap: It changes the Linux kernel keymap. I though X put the kbd in raw mode, and got keycodes which weren't affected by Linux's keymap, but maybe I'm remembering wrong or it's changed in the few years since I've used loadkeys instead of just xkb options. I don't think loadkeys even accepts the same syntax as xmodmap; loadkeys(1) and keymaps(5) don't say anything about "add" lines. The easiest way to swap ctrl and caps (for X11, doesn't affect the text consoles like loadkeys) is to set the xkb option ctrl:swapcaps. The defaults can be set in xorg.conf, or you could arrange for your X session startup scripts to include setxkbmap -option ctrl:swapcaps. I like having my capslock as an extra control (ctrl:nocaps), since some of muscle memories send my finger to the key labeled Ctrl, but capslock is right there on the home row so it's easier to reach, and where Control is on e.g. Sun and original VT100 keyboards. :) Plus, I find the Caps Lock feature useless and annoying. Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" # Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" Option "XkbOptions" "ctrl:nocaps" Option "Autorepeat" "200 40" #Ubuntu default: lv3:ralt_switch ISO level 3 shift EndSection Anyway, none of this has anything to do with the bug report, which was that if caps-lock is on _when_ you enable ctrl:nocaps (either with setxkbmap or with gnome), you won't be able to turn caps-lock off again, because you don't have a caps-lock key. This has happened to me, and I had to re-enable capslock, turn off capslock, then re-do the setting. (setxkbmap -option '' clears all options, BTW. Get that into your command history before you try to test this, unless you really like clicking your mouse. setxkbmap -print is interesting...) Strangely, X turns off the capslock LED when you hit capslock while ctrl:nocaps is set. If you hit numlock a couple times, it will sort itself out and eventually display the correct set of LEDs. I was going to say this isn't a gnome-keyboard-preferences bug, since it's the same problem when you use setxkbmap. But then I realized that I couldn't imagine anybody wanting caps-lock to be stuck on, so it would be a nice feature for g-k-p to turn off caps-lock if it's on before applying any setting that leaves the keyboard without a caps-lock key. That would make it more than a straight GUI equivalent of setxkbmap (with persistence, now that that works properly...) The X people probably wouldn't see it as a bug, either. They probably wouldn't be willing to make setting xkb options have side effects, like turning off caps-lock, since you never know what weird things people might want. GNOME should be putting the user-friendly do what almost- everyone-wants wrapping on top of thing, vs. the direct uncooked interface you get with setxkbmap. OTOH, I personally would like it if setxkbmap -option ctrl:nocaps turned off caps-lock, just in case. e.g. maybe put that in a script you can run with a mouse click, if you're using some other window manager. I can't think of any situation where I'd want to cripple a console by leaving it stuck in caps-lock on mode. Although you can hold shift to reverse caps-lock, so you could type setxkbmap, or anything else in lower case, unless that feature was disabled (with another xkb option, I think). BTW, leaving caps-lock on is an easy mistake to make (once, anyway), because turning it on when you wanted ctrl (if that's the layout you're used to) is what might make you run g-k-p in the first place, before you touch the keyboard again. (That's what I did.) -- Setting capslock to control in gnome keyboard preferences leaves capslock stuck on https://bugs.launchpad.net/bugs/105538 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs