automount working

Yay, automounting now works. I no longer have to manually mount my usb stick every time now that udev has the rules to take care of it. Actually found the rules here: The rules are below, plus comments of my own understanding of the code.

# Example udev rules for automounting usb volumes. Pulled from
# To be placed in /etc/udev/rules.d/

# Match the mounted volume
KERNEL=="sd[b-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"

# Add the volume
ACTION=="add", KERNEL=="sd[b-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"

# Create the mount point
ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /mnt/usb%n"

# Some udev magic runs this mount command if vfat is detected, else it falls
# through to the next rule, which tries to autodetect the fstype
ACTION=="add", KERNEL=="sd[b-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /mnt/usb%n", OPTIONS="last_rule"

# Mount the volume
ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /mnt/usb%n", OPTIONS="last_rule"

# Rules for umounting volume
ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/umount -l /mnt/usb%n"

# Clean up
ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rmdir /mnt/usb%n", OPTIONS="last_rule"

I just put the rules in place, plugged in my usb stick, and there it was, automounted on /mnt/usb1.

I’m running fluxbox and the setup is coming together pretty nicely now. Next that would be nice to have is suspend working, though shutdown and bootup are really so nice and quick that I could do without it.

a day updating gentoo

Today incidentally was Gentoo’s bugday, which actually happens the first Saturday of every month. I joined the IRC channel to see what was going on, didn’t do much, ended up just updating and configuring my own Gentoo systems. Anyways, every day is bugday; just visit the bugzilla to find a constant stream of them.

There’s a bug with ndiswrapper that has something to do with wrong number of parameters. People ran into the problem with kernel 2.6.27 and there’s a patch: It’s 2.6.28 now but there hasn’t been an update in the code yet. Grabbing the patch will fix it right away, though.

I always have a sinking feeling when I mass update and break things. Things aren’t streamlined perfectly, but I know enough now that I can fix stuff. Hopefully one day I can fix a bug or two.

Finally configured fluxbox so you can shutdown through the fluxbox menu. Installing sudo and configuring the halt and reboot commands to run without password is the solution. The setup is approaching a comfortable desktop environment without the extra fluff, I like it. Now if I can only figure out the issue with automounting disks…

Someone at Cantodict has published a quick hack to get Chinese-perakun to support Cantonese (haven’t tried it yet), though from a comment it looks like there’s trouble parsing words and multiple pronunciations. I really miss the functionality from Firefox 2 that offered a large popup with both Pinyin and Jyutping. I want to take a closer look at this project and see if it’s humanly possible to bring that back. It’s here:,86844,86844#msg-86844