How to reparent a CVS tree

You can either edit all the CVS/Root files by hand or with your own script, or more easily use the cvschroot command from the cvsutils package (predictably in a Debian package called cvsutils).

This post brought to you via cvschroot :)

removing mbox duplicates

Due to a snafu over the weekend my inbox (and every other folder) managed to get about 15 copies of every single message. Luckily it's easy to get rid of duplicates with formail (part of the Debian procmail package).

#!/bin/sh
formail -D 1000000 idcache < $1 -s > $1.tmp && mv $1.tmp $1
rm idcache

.Xresources

the .Xresources file is in the format classname*paramater: value. Once you change it, you need to either log out or run xrdb -merge ~/.Xresources.

You should be able to set .Xdefaults to do much the same thing without reloading.

To find the class name, use the xprop utility to look for WM_CLASS, e.g. for xtightvncviewer

ianw@mingus:~$ xprop WM_CLASS
[click on xtightvncviewer window]
WM_CLASS(STRING) = "xtightvncviewer", "Vncviewer"
ianw@mingus:~$ cat ~/.Xresources
xtightvncviewer*grabKeyboard: True

Most applications use a client name that is the executable name with a capital letter, but xtightvncviewer doesn't quite follow this rule.