Undefined color: "black"

Recently, I started having a problem with remote X sessions over VNC. This is using TightVNC version 3.3.tight1.2.9. One day emacs refused to load. It said only Undefined color: "black". This was odd because I had black in the window manager. So, I tried vi instead, except there was black on black text in some places I couldn’t read. Then I installed XEmacs to see if that was any better. It complained Warning: Color name "Black" is not defined as well as a handful of other colors before spouting a fatal error message and seg faulting.

A little digging turned up posts about rgb.txt being in the wrong place. Fedora Core 6 has it in /usr/share/X11. Some people fixed this problem by putting a soft link to it in /usr/lib/X11. I wasn’t so lucky. Another post mentioned looking for errors in the X log: grep -i rgbpath /var/log/Xorg.0.log. Since I’m having trouble with VNC, for me the log is ~/.vnc/hoover.faber-net:2.log. I got nothin’, so I looked at the file and right at the top was Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'. I put a soft link in /usr/X11R6/lib/X11 to /usr/share/X11/rgb.txt and restarted the VNC server. Then it was happy. How did this happen? Could be because I’m running a locally compiled version of TightVNC from 2003 :-p Time to upgrade…