The Haus

Monday, July 5, 2004

Compiling Apcupsd in Slackware 10

I had a problem getting Apcupsd (a Linux UPS monitoring program) to compile with Slackware 10. It seems that recently some changes have been made to the kernel headers with USB. Thankfully, there is a reasonably easy solution. Edit the file src/drivers/usb/linux-usb.c in Apcupsd's source. Before any of the #include statements, add this line:

#define HID_MAX_USAGES 0

Once that is done, everything should compile just fine. This only affects people with USB-equipped UPSes.

What to Expect in XP SP2

Information Week posted a lengthy article on Microsoft's upcoming Service Pack 2 (SP2) for Windows XP. Although this article was written with corporate use in mind, it does provide a good heads-up for all of you XP-using folks out there. In general, I think that the upcoming fixes in SP2 are all Good Things, but what is really needed is a complete rewrite with security in mind, especially with Internet Explorer. Thankfully for the IE-using crowd (boo hiss), the popularity of Mozilla and Opera is forcing MS for take a long look the the browser we all love to hate. Thanks Slashdot.

Sunday, July 4, 2004

Calling Firefox from Thunderbird and Vice Versa

One minor annoyance in using Mozilla Firefox and Thunderbird in Linux is getting them to use each other (i.e. Firefox calling Thunderbird for mailto: links and Thunderbird calling Firefox for links in emails). The task is easy in Windows if you set them both as your default apps. It's a bit trickier in Linux. After a bit of Googling, I figured it out. First of all, create two scripts. Call the first


export MOZILLA_FIVE_HOME="/usr/local/firefox"

if [ "x$url" = "x" ]; then

if $MOZILLA_FIVE_HOME/mozilla-xremote-client openURL\("$url"\); then
  exit 0
exec $MOZILLA_FIVE_HOME/firefox "$url"

Call the second one



export MOZILLA_FIVE_HOME=/usr/local/thunderbird

if [ $(/sbin/pidof thunderbird-bin | wc -w) -gt 0 ]; then
# thunderbird is running
url=`echo "$url" | sed -e's/^mailto://'`
$MOZILLA_FIVE_HOME/thunderbird -remote "mailto($url)"
# thunderbird is not running
$MOZILLA_FIVE_HOME/thunderbird -P default -compose $url

I stashed them both in /usr/bin. Remember to make them both executable. Open up the Gnome Control Center (these programs seem to follow the Gnome settings even though I'm using KDE). Go to Advanced->Preferred Applications. Click on the "Web Browser" tab and type "/usr/bin/ %s" (without the quotes) in the "Custom Web Browser" field. Click on the "Mail Reader" tab and type "/usr/bin/ %s" (without the quotes) in the "Custom Mail Reader" field. After that, everything should work fine. Note: none of this is my original work. I just put it all here for safe-keeping.

This is all a bit annoying. I've heard that the two teams are working on better interoperability. I may have to peruse their Bugzilla just to make sure.

Past Two Days' News

Recent Headlines

January 5, 2015: It Returns!
August 10, 2007: SCO SUCKS IT DOWN!
July 5, 2007: Slackware 12.0 Released
May 20, 2007: PhpBB 3.0 RC 1 Released
February 2, 2007: DOOM3 1.31 Patch

January 27, 2007: Join the World Community Grid
January 17, 2007: Flash Player 9 for Linux
December 30, 2006: Darkness over Daggerford 1.2
December 19, 2006: Pocket Tunes 4.0 Released
December 9, 2006: WRT54G 1.01.1 Firmware OK with Linux/Mac

All original information on this website is copyright © TheHaus.Net, 1999-2005. The use of original images, text, and/or code from this website without expressed written consent is prohibited. The authors of this site cannot be held responsible for any damage, real or imagined, which comes from the use of information presented on this site. All trademarks used are the properties of their respective owners. This site is not to be used as a floatation device (but if you try, I want a video tape of it).