darkness

Friday, 23 May 2003

YDL 3.0 keys in X

darkness @ 21:58:01

Today I was fighting with YDL 3.0 keys in X Windows. I’ve previous fought with keys in X on my Powerbook. Option "CustomKeycodes" and the other modifications described in that entry weren’t sufficient for only one reason: somehow, right arrow starts sending the keycode for home. I can’t seem to find a way to change this without going to the source to at least add some logging statements, since I don’t entirely grasp how all of Xkb works. (OK, that’s a lie: I basically understand none of it.)

The default key setup in X this time is almost passable, though, as opposed to YDL 2.3. I still have this problem of a lack of insert and delete keys, though. Now I’ve got the enter key next to the space bar, which is keypad enter, mapped to insert; and Fn + right Alt, which is usually… Alt_R (right Alt; if you don’t press Fn, it’s still left Alt, Alt_L), mapped to delete since I use it far less frequently. This worked out well enough.

That was too easy, though, so I had to find something else wrong. Namely, Alt was being treated as Alt, and the Apple key was being treated as Meta. Fuckers! I couldn’t get this fixed up in ~/.Xmodmap either, no matter how hard I tried. The problem with this was that I couldn’t do Apple key + backspace in a terminal window, which is like Emacs’ backward-kill-word. This just wouldn’t do. Of course, after dicking with xmodmap forever, I decided to search on something like “emacs alt meta.” This revealed the existence of the altwin option. I gather this option is most used for working with the two Windows keys on a PC-104 keyboard, to set the Windows key to Meta or Alt or other combinations like that. You can check out /usr/X11R6/lib/X11/xkb/rules/xfree86.lst for a list of different options it seems. I tried Option "XkbOptions" "altwin:meta_alt" and it worked: now my Apple key works as Meta, but I can backward-kill-word in gnome-terminal/bash. Happy days.

As a bonus, here’s my new ~/.Xmodmap:

keycode 108 = Insert
keycode 113 = Delete
remove Mod1 = Alt_R

Also, I had to use the Gnome menu editing fix mentioned in my previous entry. Worked like a charm. gtkpbbuttons keeps dying and I can’t seem to get it to restart. Don’t forget you can set trackball options in /etc/sysconfig/trackpad, though I kind of suspect that the trackpad service isn’t starting properly, or its settings are later being overridden, so I have to service restart trackpad when I first log in to X. YDL 3.0’s /etc/sysconfig/i18n doesn’t have UTF-8 in it — hallelujah. fnset still isn’t included, but you can fondle the kbdmode setting in /etc/pbbuttonsd.conf. I left mouse button emulation on and set it to use F11 and F12 for middle and right mouse buttons, respectively. I turned this off before, but now I’m thinking it’s a good thing. (Note: must stop watching Martha Stewart media with darkho.)

Yellow Dog Linux 3.0

darkness @ 04:21:16

So I’m putting YDL 3.0 on my Powerbook Pismo. My recipe for Sawfish beating Metacity to a pulp didn’t quite work. I ended up having to do something like (gnome-session-properties &); sleep 2; gnome-session-save since, after I exited gnome-session-properties, I could never get keyboard focus back to a gnome-terminal. Then on login Gnome’s loading screen froze on Sawfish. I started killing things, like Xclients and Sawfish, until it loaded with no window manager. Luckily it gave me a terminal. So I started sawfish, ran gnome-session-properties again, removed the startup Sawfish, changed the priority for Sawfish to 20, set it to restart, and saved my session.

Here’s another tip for you: YDL 3.0’s /etc/apt/sources.list is broken by default! The first repository listed points to “base” where it needs to point to “main”. (Look at the end of two lines for “base” and change it to “main”. Should be the first two uncommented.) I ran yum update but it was downloading all sorts of things forever before I stopped it. apt-get update was so much faster.

PCMCIA was broken again. PCMCIA=no was still in /etc/sysconfig/pcmcia. Changed it to yes. No dice. Set PCIC=yenta_socket. No dice. Weird messages about needing pcmcia_core.o. I tried modprobe pcmcia_core.o and it fails. Why not just modprobe pcmcia_core, which works? I have no idea! I edited /etc/init.d/pcmcia, found the part where it says if -d $PC ; then and changed it to if -d x$PC ; then. Result is that the conditional always fails (I hope, uh, this is not the best fix really) so it never attempts to probe the stupid module name. The elif section following this newly-broken conditional loads the correct modules.

Powered by WordPress