Tomato ROCKS!

One of the interesting things about Linux is the license that governs its use: the General Public License (GPL). Under the GPL, you are free to take Linux and customize it to your heart’s delight, as long as you release the source code of your changes to the public. I could, for example, buy a bunch of PDAs from a Chinese manufacturer and take a version of Linux, strip it down to the bare essentials, and load it on the PDAs. As long as I give the source code out to anyone that wants it, I can legally sell these “jimcofer.com PDAs” all day long.

Network appliance maker Linksys released several routers in the early 2000s that used Linux as their firmware (firmware is the term used for “operating systems for devices”. Almost anything electronic has a firmware, and many devices – like CD\DVD drives, motherboards and routers – have firmwares that can be updated as new features or bug fixes become available).

A group of folks got the source code from Linksys and created DD-WRT, a free, open-source firmware that added a lot of interesting features not commonly seen in consumer-grade routers. In time, DD-WRT either branched off or directly inspired many similar firmwares, like HyperWRT, OpenWrt, X-Wrt and Tomato. Tomato is a free, open-source project that adds many of the same features as DD-WRT, but with a user-friendly interface.

I’ve replaced the wireless router at my home several times. The first was an early Linksys 802.11b model, which worked fine but seemed a bit slow, so it was replaced with a Microsoft MN-700 802.11g model. This worked OK, but had a bug (common to home routers) that caused it to stop responding after using Bittorrent for a few days. This router was replaced with a Gigabyte 802.11g model that I loved; sadly, this router gave up the ghost after a couple year’s good service. This was replaced with a D-Link model that was nothing but junk. The D-Link rebooted several times a day, sometimes as many as 10 times in a row.

I decided to get a new router, but this time I’d do some research. We have VoIP service at home from a company similar to (but cheaper than) Vonage. VoIP requires upstream bandwidth, and if I have Bittorrent running, callers frequently can’t hear my voice as all of my upstream bandwidth is being sucked away by Bittorrent. So I needed a router that would do Quality of Service (QoS), a technology whereby data packets are assigned a priority based on certain characteristics, and some data packets may be delayed (or dropped altogether, if necessary) to allow other, more important, packets to be delivered.

My research led me to the Linksys WRT54GL, a router that Linksys makes especially for home enthusiasts.

To upgrade to Tomato, set up the new router, then download the latest version of the firmware from the project page. Next, log in to the router’s admin panel and navigate to the “upgrade firmware” page. Select the appropriate Tomato firmware for your router model and click the “Update” button. In around 2 minutes, simply reload the admin page. If everything has gone well, you should see something like this:

Tomato (1)

You then configure the router basics, just as you would with any model. Although Tomato’s interface takes a bit getting used to (especially with its advanced features), it’s easy once you get the hang of it. I also appreciate many of the “Web 2.0” type aspects of the UI. For example, one of Tomato’s most popular features are the bandwidth graphs. As you might guess, these graphs show you how much bandwidth you’ve used; the neat thing is that the graphs update in real time, so you can see at an instant where your bandwidth is going. Many other features that normally require you to reload a typical router’s admin page are handled dynamically in Tomato. And you can also sort most things in any way you’d like. For example, on the “port forwarding” page you can sort the forwardings by name, IP address, or port range – which is handy in situations where you need to forward a lot of ports to different computers.

But the Tomato’s best feature – the one that the geeks love – is QoS. Setting up QoS isn’t easy or intuitive, even with Tomato. But once you get everything set up, it works beautifully. I’ve had Bittorrent uploading at the maximum rate, then gotten a phone call. The caller reports that I sound just fine, and I can actually watch my Bittorrent program slow down as BT packets are dropped in favor of VoIP packets:

Tomato (2)

My QoS configuration. In the screen cap above, I have given highest priority to any data coming from the MAC address of my PAP2 phone adapter. After that, priority is given to DNS packets and basic web browsing. HTTP traffic of greater than 512kb (a.k.a downloads) is then given priority, with Bittorrent traffic getting the lowest priority. Remember, QoS only drops or slows down packets if necessary, so if I’m not getting a phone call or surfing the Internet, BT operates a full speed.

Tomato also has the ability to update not just one, but two DDNS providers. So if you use a dynamic DNS update service like DynDNS or No-IP and you use OpenDNS, you can have Tomato update both services as your IP address changes. In fact, when\if you go to set up OpenDNS in the DDNS page, Tomato will ask if you want to use OpenDNS’s DNS servers permanently; just click “OK” and the static DNS entries will be added to your router’s configuration automatically. It’s a nice touch!

There are some nice features for wireless users, too. You can change the amount of power applied to the antenna in Tomato, which makes your wireless network more powerful and helps eliminate “dead spaces” in your house. A router running Tomato can also act as a wireless client if necessary. Tomato can even scan the area for other wireless networks:

Tomato (3)

This feature isn’t, strictly speaking, necessary. But it’s really cool to be able to scan wireless networks without having to go downstairs and get on Lisa’s wireless desktop.

I can’t tell you how happy I am with Tomato so far. It’s only been a few weeks, but online life is just so much easier with Tomato. I no longer have to use my Bittorrent client’s scheduler to slow down upstream bandwidth during “calling hours”, nor do I have to dash across the room to slow it down manually when a call comes in. Everything “just works”. It’s sad that it’s taken this long, but now that I’m here I won’t go back to the “old way”.

If you’re in the market for a new router, make sure that it’s compatible with Tomato – even if you don’t plan on making the leap any time soon!

Google Calendar Sync

Google Calendar SyncDo you use both an Outlook Calendar and a Google Calendar? Maybe you’re required to use an Outlook Calendar at work, but use a Google Calendar at home or with your mobile phone. Maybe you’ve wanted the ability to synchronize the two…

Now you can! Just download Google Calendar Sync and you’ll be on your way! You can choose to have two-way synchronization between the calendars or only one-way only (from Google Calendar to your Outlook Calendar, or from your Outlook Calendar to your Google Calendar only).

It’s from Google, it’s free, and it works.

Enable Spellcheck in Firefox Forms

If you use Firefox, you probably know (and love) the built-in spellchecker. However, it has one tiny failing: by default, it only checks spelling in large forms (such as the body of an email on a webmail form). It won’t check smaller items like the subject lines of emails or online comments. If you’d like to enable spellchecking in smaller forms, just check out this post over at Download Squad. Here’s the skinny for people already familiar with about:config

  1. Open up the Firefox configuration window by typing about:config in the address bar.
  2. Type layout.spellcheckDefault in the filter box.
  3. Change the value from 1 to 2.

Get Windows Vista fonts in Windows XP!

Here’s a neat tip from the folks over at Lifehacker: if you’re still running Windows XP, but you’d like to get the fronts shipped with Windows Vista, all you need to do is download and install Microsoft’s free PowerPoint 2007 Viewer. This program will not only allow you to view PowerPoint 2007 documents, it’ll also add several of the Vista fonts to your system, which you can then use in Office 2003 programs. Of course, you can also get the fonts by installing Office 2007, which isn’t free, of course, but if you’ve been planning to upgrade, maybe this will be an extra incentive.

Finding a Remote MAC Address

It’s not often that you’ll need to know the MAC address of a networked device. Maybe you want to set up a MAC filter for your wireless network (which is pointless, since MAC addresses are sent in clear text, but I digress). Or maybe you want to set up QoS rules on your router. In any event, you need the MAC address for a device, but you just don’t want to walk all the way across the house to get it… or maybe the device is difficult to get to – perhaps locked away in a server room, and you don’t have a key.

All you need to do to get the remote IP address is to ping the device (Start > Run > CMD > ping [ip address]) and then run the ARP -A command at the command-prompt:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\jcofer>arp -a

Interface: 192.168.1.100 — 0x10003
Internet Address Physical Address Type

192.168.1.3 aa-fb-c8-34-da-7a dynamic

Windows will make a list of all the computers you have connected to recently. As you can see in the example above, my local IP address is 192.168.1.100. The only computer I’ve connected to lately was 192.168.1.3 – which has a MAC address of aa-fb-c8-34-da-7a.

COOL WP PLUG-IN: Sidebar Page Sections

WordPress comes with several interesting and helpful widgets built-in. A WordPress site owner can log in to the admin panel of his or her site and click on Presentation > Widgets and add, remove or reorder several available widgets. If you don’t want the “Categories” widget on your blog’s main page, simply drag it from the sidebar mockup to the “Available Widgets” bank at the bottom of the screen, and it will no longer appear in the sidebar. If you’d prefer to have the “Recent Comments” widget appear above the “Recent Posts” widget, simply drag the Comments post above the Posts widget, and they’ll be reordered the next time you load your home page.

Perhaps the handiest widgets are “text widgets”, which, despite their name, can contain HTML code. You see the pic of Arthur Guinness at the top of the sidebar? That was created with HTML code typed into a text widget. The WIMZI widget? HTML code that was copied from AOL’s site and pasted directly into another text widget. The “I’m listening to:” and “I’m reading:” widgets? Both are single lines of HTML code pasted into text widgets.

There are two problems with text widgets, however. The first is that WordPress doesn’t give you any way to give each widget a meaningful name, so you’re stuck with widget names like “Text 1”, “Text 2” and so on. Is the WIMZI widget “Text 5” or “Text 6”? The only way to know is to actually open the widget and look at the code inside. The other problem is that WordPress, by default, only allows you to have a maximum of 9 text widgets. This may seem like a lot, but once you start playing around with things, you just might find yourself bumping up against the maximum number.

The Sidebar Page Sections plug-in fixes both of these problems, albeit in a clumsy way. You install the plug-in the same way you install any plug-in. Then you click on Presentation > Sidebar Page Sections. You’ll see three text boxes on the page that opens: the first is marked “Title Tag”, the second is “Page Sections” and the last – the one we’re interested in – is called “Named Text Blocks”. Just type in the names you’d like to give each widget (one per line, please) and click “Save Options” when done. Then click the Widgets link, and you’ll see a bunch of new widgets in your “Available Widgets” bank. Unfortunately, there’s no way to automagically copy the text from the widget “Text 5” to your new “WIMZI” widget, so you’ll need to drag the “WIMZI” widget to the sidebar, open “Text 5”, copy the text therein, paste it into “WIMZI”, then drag “Text 5” back to the bank. Oh, and you’ll also need to repeat this for all your other widgets. Like I said, it’s not pretty, but it beats constantly opening “Text 4” to see which widget it is. Oh, and you can have as many “Named Text Blocks” as you’d like with this plug-in; the 9 widget limit does not apply.

The plug-in also has a nifty feature that allows you to gather WordPress pages into “groups” that only appear when certain conditions are met. For example, let’s say you have a “Cars” page on your blog where you talk about how much you love cars. You also have several “sub pages” for each make you like, such as “Chevy”, “Nissan” and “Toyota”. If you don’t want the “make pages” showing up in your main pages list, you can create a “sub group” and tell it to only appear on the “Cars” page. That way, your front page remains clean and the make pages only show up where appropriate. Note that I haven’t tested this functionality at all.

COOL PROGRAM: DriveImage XML

I’ve been using “disk imaging” software for just over 10 years now. Such software allows you to either move everything on your hard drive to a new disk (cloning) or make an image file of the contents, which you can then save as a backup or use to deploy the image to as many computers as you’d like. The advantages in every scenario are obvious. Simply doing a standard “file copy” within Windows can take forever, and if you’re trying to copy a system drive to a new disk, Windows will choke on the “in use” files and refuse to copy them. As a backup, imaging software copies everything on a disk; if you want to reformat your system you could easily copy all of your documents to a flash drive or CD\DVD… but chances are that you’ll forget at least one thing, and having an image of the drive means that you can always go back and retrieve that file later. And of course, imaging software is a must when a company wants to deploy lots of new computers. I once imaged almost 300 computers over a weekend for a client that was moving into a new building and got all new computers for staff. As you can imagine, manually installing Windows on nearly 300 computers would take weeks; installing Windows on one computer (along with Office and all the updates) and then copying the image to all the others took less than 3 days.

The only problem I have with imaging software is that I’ve never found a program that I really liked. I was a huge fan of Ghost when it first came out. It was a single, small executable file that could easily fit on a boot disk or network share. Symantec bought Ghost back in 1998 though, and Ghost kept getting bigger and bigger – until 2003, when Symantec bought PowerQuest, its biggest competitor in the disk imaging market. Symantec then tried hashing Ghost and PowerQuest’s DriveImage product together, and the result was, for a couple of years, a jumbled mess. I simply gave up and started using Acronis TrueImage, which was a somewhat new product at the time. Come to find out, True Image has always let me down when I needed it most. The boot discs froze when I attached a USB hard drive to my system. The boot discs also were very picky (a boot disk made with version 9.0.123 would think that a disk image created with 9.0.456 was “corrupt”, for instance). And TrueImage is as slow as Christmas! I tried using it in the field a couple of times, only to have the program’s progress bar give me “four hours remaining” on both jobs – on modern computers with no more than 12GB of disk space used!

I then decided to take a look at DriveImage XML. This program is free (unlike Ghost and TrueImage) and it stores your data in XML files, which are an open standard that third-parties can use to create plug-ins. And not only is it free and based on an open standard, it also leverages Microsoft’s Volume Shadow Copy service to copy files in use on your computer; rather than re-invent the wheel, the app uses the tools Microsoft builds in to Windows! This not only makes DriveImage small (the current version is less than 2MB to download), the program’s back up is reliable, too! The program is blazing fast too – I used it just a couple of days ago to back up a client’s computer, and it only took around 15 minutes to back up 8.7GB worth of data to a 5400rpm laptop drive in an USB 2.0 enclosure. But the best part – the best part – is that it’s included on the Ultimate Boot Disk for Windows. All you have to do to use DriveImage outside of Windows is attach a USB hard drive to your computer, boot off the Ultimate Boot CD and start the DriveImage plug-in. Compared to Ghost and TrueImage, I find this reliability and ease of use simply stunning.

DriveImage Browse
Browsing the contents of an image file

I’ve only recently started using DriveImage XML. I like it a lot so far – although the interface is a bit rough around the edges, and the program itself is really basic. The program is fully scriptable via Task Scheduler, so the admins out there will probably appreciate that.

I’ll keep you posted on how well it works when I need it!

COOL PROGRAM: Ultimate Boot CD

Windows Preinstallation Environment (WinPE) is a miniature version of Windows XP, Windows Server 2003 or Windows Vista. Originally developed to allow system builders and corporate clients to deploy new computers, it has since been embraced by third-party vendors (Symantec’s Ghost, for example, uses WinPE as its boot disk) and technical support people.

What it is, in a nutshell, is an improved version of the old DOS boot disk. In the old days, if you had some problem that prevented your computer from booting, you could stick a DOS diskette into your floppy drive and boot from that. You’d then be able to access your files, and hopefully fix whatever was wrong with the system. However, as the years have passed, the DOS boot disk developed some severe limitations. To begin with, DOS cannot natively access the NTFS file system, the file system of choice for Windows NT, Windows 2000, Windows XP and Windows Server 2003 installations. DOS cannot access files or partitions over a certain size. DOS does not support USB drives of any kind. Any applications used in DOS have to be recomplied with that operating system in mind. And DOS does not (and will not) support multitasking (running more than one program at once). In short, DOS is an ancient, albeit reliable, beast; someone somewhere had to come up with a better solution.

It turns out that guy was named Bart Lagerweij. Lagerweij was a minor Internet celebrity, making a name for himself by releasing several popular boot disks for DOS and putting them online for anyone to download. DOS supports networking, for example, but making a boot diskette that reliably connects to a network can be a huge pain in the neck. Lagerweij’s popular “Network Bootdisk” made creating boot diskettes with TCP\IP support a painless affair. In 2002, Lagerweij saw WinPE in action and knew the days of the DOS disk were numbered. The only trouble was that Microsoft only licensed the software for system builders and large corporate clients. Lagerweij went to work at deconstructing WinPE, and eventually figured out a way to make his own version using a standard Windows XP installation CD. And thus, BartPE was born.

The only problem with BartPE was that it wasn’t exactly user-friendly. Yours truly downloaded an early version of the “disk builder” program and eventually gave up – it was really difficult and since I had no pressing need for it, I didn’t want to waste my time on it. Wouldn’t it be better, I thought, if someone released a “ready to go” version of a BartPE disk?

Someone did. It’s called the Ultimate Boot CD for Windows. All you need to make your own boot CD is a copy of a Windows XP installation CD (preferably one with SP2 slipstreamed), a CD\DVD burner and a blank disk, and the Ultimate Boot CD application (available here). It’s so easy that every single step you need to take can be easily described (with screen shots!) on this page.

Once you’ve got your CD burned, you can boot directly into a 32-bit Windows environment. The Ultimate Boot CD comes with a galaxy of pre-installed programs – check out the full list here. Several “name brand” antivirus programs are included (such as McAfee Stinger, Kaspersky VRT and AVG Free), as are popular antispyware programs (AdAware, Spybot). Firefox, Irfanview, Notepad++ are included, as are popular disk burning applications like DeepBurner. Also included is my new favorite disk imaging program, DriveImage XML. Honestly, the list of programs included on the disk is huge; while BartPE gives you the ability to add just about any 32-bit Windows application to a boot disk, you need not bother with Ultimate Boot CD – just about anything you could want is already there.

And, unlike DOS boot disks, the Ultimate Boot CD comes with all the “modern conveniences”. As soon as you boot into the Windows-like desktop, you’re asked if you want to enable network support. Click “yes” if you want, and a simple box opens up that asks if you want a DHCP or static address. Choose an option, and since Ultimate Boot CD supports almost every modern network card, you have instant network access. Want to attach a USB device to dump an image? Just attach the drive and go!

Automating System Maintenance

Windows has some nifty built-in system maintenance tools. Disk Cleanup, for example, rids your hard drive of unneeded temporary files. Disk Defragmenter reorganizes your files for optimum system performance. Sadly, though, there’s not an easy “just click here” way to automate those utilities. That doesn’t mean, however, that you can’t automate those tasks:

Automating Disk Cleanup

You can make Disk Cleanup run as often as you’d like. It takes a little bit of work, although once it’s up and running, you don’t have to do anything else:

1) Click Start > Run

2) Type “cleanmgr.exe /sageset:50” (without the quotes) into the “Run:” box. Note that you can use any number between 0 and 65535 with the /sageset switch. I chose the number in my example (50) for simplicity reasons.

3) A window will appear that looks much like the standard Disk Cleanup screen. Choose which options you’d like Disk Cleanup to clean and then click “OK”.

4) Click Start > “Control Panel” > “Scheduled Tasks” > “Add Scheduled Task”.

5) Click “Next” (there will be a considerable delay between this step and the next).

6) You will be presented with an alphabetical list of most of the programs on your system. Scroll down and choose “Disk Cleanup”, then go on to the next step. If you don’t see “Disk Cleanup” listed, click “Browse” and navigate to the Windows\System32 folder and click on “cleanmgr.exe”.

7) Give the task a name and choose how often you’d like the task to run, then click “Next”.

8) Refine your time choices on the following screen, then click “Next”.

9) Enter the user name and password of the account you’d like the task to run under (usually this would be your own user name and password), then click “Next”.

10) Make sure that the “Open advanced properties for this when I click Finish” box is checked, then click “Finish”.

11) In the window that opens, look for the “Run:” box near the top of the screen. Type in “/sagerun:50” at the end of the run command, so that the complete text looks something like this:

C:\WINDOWS\system32\cleanmgr.exe /sagerun:50

12) Click “OK”. You be probably be prompted to enter your user name and password again; do this.

As you might guess, you can run the SAGESET option with different numbers to create multiple “profiles” for Disk Cleanup to use. For example, you might want to have Disk Cleanup clear out your Temporary Internet Files daily, but only do a “deep cleaning” once a week. In this case, you’d run SAGESET with one number (say, 50) and choose only the “Temporary Internet Files” option. You can then run SAGESET again with another number (say, 51) and choose to clean out all options. You’d then schedule one task to run daily with the /sagerun:50 option, and another task to run weekly with the /sagerun:51 option.

Continue reading “Automating System Maintenance”

Creating Files With No Name

It doesn’t happen that often, but there are times when you might need to create a file without a name. One example is an .htaccess file. It’s a plain text file used on web servers to (generally) control access to certain directories. For example, most smaller web sites (like this one) are hosted on “shared servers”, that is, a server that hosts multiple web sites on one machine. To keep other (legitimate) users of the server from accessing my files, my web host uses an .htaccess file to restrict access to my files to anyone with my user name and password. Likewise, I use an .htaccess file in my own site to keep people without a username and password from accessing certain “storage” directories.

The problem with creating or editing such files in Windows is that Windows hates files without a “proper” name. Windows wants a file called “filename.extension” (like notes.txt) and it just chokes when you want to create a file without a name like (.htaccess). So if you need to edit your .htaccess file on a Windows computer (or, for that matter, any “hidden file” on a Unix system, like .config), Windows usually pitches a fit and demands that you give the file a name.

To get around this, simply put the file name in quotes when you go to save it. For instance, in Notepad you’d click File > Save, then choose “All files” and enter “.htaccess” as the name… aaaaannnd presto! One .htaccess file created in Windows, without the hassle!