linux

Internet Explorer 6 on Linux

If you design or develop web pages, you know Microsoft's Internet Explorer 6 web browser as the hideous flesh-eating demon that terrorizes your dreams at night. Despite its litany of lethal technical and security flaws, IE6 maintains around 25% market share. (Even here in Silicon Valley, the libraries in Atherton and Menlo Park still run IE6 on their public PCs.) That means web developers must test their pages on IE6, and learn how to accomodate its quirks and bugs, or else risk losing that clueless but stubborn one-quarter of the browsing public that refuses to upgrade.

Fortunately, Linux developers do not need to run Windows in order to test their pages on IE6 and even IE5. A script called ies4linux, written by Sérgio Luís Lopes, lets you run IE under the Wine translation layer. Here's how I installed ies4linux on Debian unstable:

# aptitude install wine cabextract
$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
$ tar zxvf ies4linux-latest.tar.gz
$ cd ies4linux-*
$ ./ies4linux –no-gui

I ran the installer with the --no-gui option after the default PyGTK GUI interface crashed on me.

Yet another reason to avoid Microsoft Windows

Connecticut teacher Julie Amero was facing up to 40 years in prison after malware infected her Windows 98 machine. Outrageous and scary.

About those quotations...

Drupal lets you specify a "mission statement" to be displayed on the main page of your web site. I like this idea, but I couldn't think up a clever enough "mission" for myself (although I was tempted to use Building a fighting force of extraordinary magnitude).

In the end I decided to make the server execute the venerable Unix fortune program to generate a random "mission statement" every time the main page is reloaded.

The fortune database contains hundreds of quotations, aphorisms, and adages, none of which were written by me, or are under my control, so the usual disclaimers apply.

Here's the relevant modification to the Drupal file page.tpl.php:

<?php if ($mission) { ?>
  <div id="mission">
  <?php 
     exec('/usr/games/fortune -s', $fortune);
     foreach($fortune as $line) { print htmlspecialchars($line)." ";}
  ?></div><?php } ?>

Wireless network on cable modem

I finally decided to join the 21st century and set up a wireless network at home. I was a little apprehensive at first because my ISP is Comcast cable, whom I knew I couldn't count on for support. Luckily the setup went pretty smoothly.

The first hitch was that I had foolishly neglected to power-cycle the cable modem before plugging in the wireless router (NetGear WGT624v4). The cable modem registers the MAC address of whatever it's plugged into, so you need to shut it off for 30 seconds before you plug in something different like a new wireless router. Once I did that, everything worked fine with the default settings. Then I changed the router admin password and enabled encryption (it's amazing how many unsecured wireless networks you can find in my neighborhood with iwlist scan). On the client (Debian) side all I had to do was install wireless-tools and wpasupplicant and then appropriately configure /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf.

A second problem, that I didn't notice right away, was that my ssh sessions started timing out after five minutes or so. That was the wireless router, "helpfully" terminating my idle sessions. To fix that, I appended the line ServerAliveInterval 240 to my /etc/ssh/ssh_config. That makes the ssh client send a keepalive signal every four minutes to avoid timing out.

Yet another drupal site

I've finished porting my web site from WordPress over to Drupal. My overall impression is that Drupal is a very impressive CMS. The PHP implementation is clean and solid. The quantity and quality of available modules is staggering. Here are some contributed modules that are useful for a single-user blog:

  • NoRequestNewPass
  • Pathauto
  • Meta tags
  • Tagadelic

One thing I've noticed however is that you need to stick to the core themes if you want your site to work on every browser. There are some beautiful contributed themes out there, but every single one I tested exhibited glitches on one or more browsers, and none of them passed W3C validation.