Archive for the ‘software’ Category

From Novice to Master, and Back Again

January 14, 2013

In 1985, I was a freshman at St. Olaf College in Minnesota. The college had a VAX 11/780 running 4.2BSD and a PDP-11/70 running v7 with some Berkeley and local code hacked in. It was my first experience with multi-user systems other than dialing into an MS-DOS BBS or two.

The college’s Academic Computing Center had printouts of the 4.2BSD manuals, plus some home-grown documentation, available for sale so students could learn how to use UNIX. One week I sat in the Science Center terminal room and started going through the alphabetical list of the commands available on the VAX, trying each one and reading its man page to learn what it did.

Eventually I got to “su”. “Become the super-user”? What’s that? Does it involve wearing a cape? Sounds interesting, so I tried it. To my disappointment, it just asked for a password, and wouldn’t do anything.

Shortly thereafter, someone came running into the room and asked, “Are you David MacKenzie? Did you just run ‘su’?” “Yeah… what does it do?” “Uh, don’t do that.” My failed “su” attempt had been logged on the system console and one of the sysadmins was worried about an attempted breakin.

Within a year, I did have root access on the VAX, as I learned enough to be hired as a student system programmer. I contributed to upgrading the machine to 4.3BSD when that was released.

Recently I was working on a CentOS Linux virtual machine and needed to look up the command-line options to “su”. I had worked for the past several years mostly on Macs where “sudo” is preferred, so my “su” skills were rusty. I ran “man su” and got the information I needed. Then at the bottom of the screen I sheepishly read “Written by David MacKenzie.”

In the 1990s, while filling in gaps in the GNU toolset, I wrote the GNU “su”, and I had forgotten about it. It’s still what Red Hat and other distributions are shipping.

At least I know what it does now.

Migrating Firefox

June 18, 2012

This is the procedure I use when migrating someone who uses Firefox to a new computer or rebuilding their computer. This works on both Windows and Mac.

  1. Backup their bookmarks. There used to be a bookmarks.html file you could copy from the Firefox profile, but now they’re in a database so you need to export them.
    1. From the Bookmarks menu, select Show All Bookmarks. This pops up a Library window.
    2. In the Library window, from the rightmost pulldown menu (with a star on it), select Backup and put the file on a network drive or removable drive. This backs up the bookmarks to a “JSON” file.
  2. Backup their saved login/passwords.

    1. From the Tools menu, select Add-ons.
    2. On the left, click Get Add-ons. In the “Search all add-ons” box in the upper-right, type “password exporter”.
    3. Find Password Exporter in the list of search results and click the Install button next to it.
    4. Go to Preferences (Mac) or Tools>Options (Windows), Security tab.
    5. Click the “Import/Export Passwords” button added by the Password Exporter add-on.
    6. Click the “Export Passwords” button and put the file on a network drive or removable drive. This backs up their logins and passwords to an XML file.
  3. Then, on their new computer, use similar procedures, except select Restore in the Library window menu and “Import Passwords” in the Import/Export window.

Using Removable Drives on Windows

April 10, 2011

In the last few months, I’ve been using USB and Firewire hard drives (and flash drives) on Microsoft Windows more than I used to. Getting them to work well is not as simple as it is on MacOS X.

Below I refer to running the Computer Management console. You can run it by right-clicking My Computer (XP, Server 2003) or Computer (7, Server 2008R2), which is either on the Start menu or on the desktop, and selecting Manage. Or you can find it in the Control Panel under Administrative Tools. In Computer Management, go to Disk Management, under the Storage category in the left sidebar.

Here are a few things I’ve learned about working with removable drives on Windows.

  1. How to safely eject a removable drive on Windows? On MacOS X, there’s a little eject button next to the drive in the Finder, or you can drag the icon from the desktop to the trash can, or right-click on it and select Eject. On Windows, a little Safely Remove Hardware icon appears in the system tray, but sometimes it’s hidden. And on Windows XP, if you have multiple removable devices plugged in, it’s hard to figure out which is which because the descriptions are so generic. On Windows 7 and Server 2008R2 it shows you more details about each device.
  2. By default, throughput of removable drives on Windows is only around half of what the hardware is capable of. Because it’s so hard to figure out how to safely remove the drives in Windows, the default setting is to optimize for safety, so you can just unplug the drive without needing to worry about flushing buffer caches. If you’re willing to use the Safely Remove Hardware mechanism, you can roughly double the drive’s performance. In Computer Management, right-click on the drive name and select Properties, go to the Policies tab, and select Optimize for performance. You have to do this for each different removable drive you plug into the PC; there doesn’t appear to be a way to make it the default, e.g. through a registry edit.
  3. Windows 7 comes with multiple Firewire drivers. You can select a driver in the Device Manager in the Properties box for the Firewire adapter, Driver tab, Update Driver button. To run the Device Manager, on Windows 7 you can search for it in the Control Panel; on Windows XP, right-click on My Computer, select Properties, Hardware tab, Device Manager button. Easy to find, right? The default Windows 7 Firewire driver works poorly; it is very slow and incompatible with many devices. You can also select the “Legacy” Windows XP style driver, but it’s missing some features (especially good Firewire 800, a.k.a. 1394b, support). You might also have the option of selecting a driver from your Firewire chipset’s manufacturer, such as LSI or Texas Instruments; in my experience, those work better than Microsoft’s drivers. Also better than either of the Microsoft drivers is the Unibrain ubCore Firewire driver. It gives better transfer speeds and higher reliability than other Windows Firewire drivers I’ve tried. It supports all the Firewire cards I’ve tried it with, not just the ones Unibrain makes. It’s a free download although you have to enter your email address for the link. It comes with a utility to switch between Unibrain’s Firewire drivers and Microsoft’s.
  4. Speaking of Unibrain, they do make some of the best Firewire controller cards. They maximize performance by using a chipset that is native PCI Express, not PCI or a bridge to a PCI chip like many others. I recommend the FireBoard800-e V.2 1394b PCI-Express adapter (for desktops) and FireCard800-e 1394b ExpressCard 34 adapter (for laptops with ExpressCard slots). I get them from They work on Mac Pro and MacBook Pro computers with those slots (using the built-in Apple drivers) as well as on Windows PCs.
  5. Drive letters, the ridiculous legacy of MS-DOS being a copy of CP/M, can cause problems on Windows, especially in the presence of mapped network shares. If you have several removable drives plugged in, Windows might start assigning them drive letters that are already used by mapped network shares, hiding the network shares. Then you have to manually assign the drive a different drive letter to resolve the conflict. In Computer Management, right-click on the drive partition and select Change Drive Letter and Paths.
  6. If you get a hard drive that’s pre-formatted for Windows, it might use the NTFS file system or it might use FAT32. If you’ll be using the drive only on Windows, make sure it’s formatted with NTFS, which supports files larger than 4GB, and is faster and much less likely to corrupt your files, especially if the power fails and you don’t have a battery backup. If you need to use the drive to transfer files between Windows and Mac systems, it’s easiest to do it using FAT32, because Macs can read but not write NTFS file systems. However, there are several add-on products that allow Macs to write to NTFS, including the free NTFS-3G, which I’ve used occasionally and haven’t had problems with. You can reformat a drive in Computer Management; right-click on the partition and select Format. If you use a drive mainly on Macs, you can buy MacDrive to allow Windows to read and write Mac HFS formatted drives.


Get every new post delivered to your Inbox.

Join 85 other followers