Friday, November 20, 2009

Windows 7

So, I'm basically liking Windows 7. Take everyone's advice and skip Vista. Of course go to and disable the stupid CAPS LOCK key. When I needed to add a HP LaserJet 1020 attached to a Mac Mini, I needed to download the "Adobe Universal Postscript Printer Driver" and specify "Generic Postscript Printer" and "". Also, Adobe's reader didn't do a good job of printing a pdf to that printer, but foxit it did. Strange.

I'd love to hear the logic behind not being able to do an upgrade from XP to W7 without saving all one's files and doing a clean install.

Wednesday, November 4, 2009

dansguardian on OSX

sudo port install dansguardian
sudo launchctl load -w /Library/LaunchDaemons/org.macports.dansguardian.plist
sudo mkdir /opt/local/var/run
sudo port install squid
sudo launchctl load -w /Library/LaunchDaemons/org.macports.Squid.plist
Once this is done, one has to force the browsers to go through Dans. For Safari, System Preferences -> Network -> Advanced -> Proxies and set localhost and port 8080 to what you want filtered:

For firefox, it's a little more complicated

1) in /Applications/, create a file named firefox.cfg that contains:
lockPref("network.proxy.http", "");
lockPref("network.proxy.http_port", 8080);
lockPref("network.proxy.ssl", "");
lockPref("network.proxy.ssl_port", 8080);
lockPref("network.proxy.ftp", "");
lockPref("network.proxy.ftp_port", 8080);
lockPref("network.proxy.type", 1);
2) edit /Applications/ and add these two lines:
pref('general.config.obscure_value', 0);
pref('general.config.filename', 'firefox.cfg');
You'll need to check these every time you upgrade firefox...

Tuesday, November 3, 2009

MySQL upgrade for FC10 to FC11

I, and many other people apparently, ran into a MySQL bug while upgrading from FC10 to FC11. The error messages included "Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'host'; try to repair it". It looks like there were MySQL v4 tables, and not running an upgrade for 5.0 created a problem for 5.1. Googling found one answer to be downgrading to 5.0, upgrading the tables, upgrading to 5.1 and doing another upgrade. Why either MySQL or FC couldn't do the right thing is beyond me. Anyway, removing the 5.1 libs breaks a lot of other programs, so I took the approach of building and installing 5.0 in /usr/local, doing the upgrade using that set of binaries, then going back to using the 5.1 binaries in /usr. This did the trick. I might have been able to use "rpm --prefix-", but didn't try. Here is the approximate incantation.
cd /usr/local/src
wget mysql-5.0.87.tar.gz
# from
gunzip mysql-5.0.87.tar.gz
tar xf mysql-5.0.87.tar
cd mysql-5.0.87
./configure --prefix=/usr/local
make install
export PATH=/usr/local/bin:$PATH
mysql_upgrade --socket=/var/lib/mysql/mysql.sock
/usr/local/bin/mysqladmin shutdown

export PATH=$P
mysql_upgrade --socket=/var/lib/mysql/mysql.sock