The Command Center

The Command CenterWhen I started my new job, I revamped my home office, which had been home to a rickety desk and stacks of books and papers all over the floor. For under $500, I got a big L-desk, a nice speaker phone, a printer stand, two beautiful wooden file cabinets, and a 6-foot bookshelf. I’ve got a pretty swank work space now. At my last job, people always joked that I was at sort of a Star-Trekkish command center because I had a flat screen monitor hooked into a Belkin port switcher that allowed me to use both a PC and my main Linux machine with just the one monitor/keyboard/mouse. I also had my laptop set up there, and all three systems were plugged into a little hub so that they could all get network from my one wall jack.

At home too I’ve got a little command center, with the laptop, a Linux box managing printing and poor-man’s samba backups under the desk, and a brand new Mac Mini sitting — get this — on my keyboard tray. The Mac is the newest addition and is a definite departure from the usual routine for me. I’ve been using Linux as a desktop OS for a couple of years and as a server platform for about five years, and I avoid PCs whenever remotely possible. Until this week, I had hardly touched a Mac in more than six years, when I did desktop support at UNC; we were on OS 7.x back then, and there have been a lot of changes. Some of my impressions about the Mac experience follow.

Setup. The system worked out of the box. Being a Linux user, I’m not exactly used to this. It took me a week of frustration to get the wireless, Synaptics touch pad, and wide screen monitor on my current laptop to work under Fedora Core 3. So I plugged in my Mac and it just worked. Today, I plugged my camera into a USB port to download the picture of the office, and as soon as I plugged it in, iPhoto started up and offered to download the images. No setup, none of the mounting of devices that I’m used to doing in Linux, no irritating system tray bubble telling me that a new device had been found and to click if I wanted more info.

Aesthetics. The Mac is a beautiful thing. Some of the default UI for applications like Safari that looks sort of like brushed metal I could do without, but the general tendency on the Mac is toward beauty. Smooth fades and slides as applications change state (focused or not), transparency of the docking bar, the crispness of the icons: These are all nice touches that make the OS a joy to use. Linux should aspire to the Mac aesthetic.

Speed. It may just be that I don’t have enough RAM (256M), but my Mac feels a little sluggish. Every Mac I’ve ever worked on felt a little slow to respond things. There was a time when Windows felt to me like it had the fastest-responding and most crisp UI going. Then XP with all its bloat and sluggishness came along, and newer versions of Linux came along that, to my mind, in most applications, topped Windows. My experience so far is that my Linux laptop is faster to work with than the Mac (part of the reason I write this from the laptop). Even with only 7MB of its 384MB free right now, my laptop is responding more quickly than the Mac, which has 62MB free.

Installing Applications. Installing applications on Windows has long been a strong point, I think. You click a setup file, and a wizard guides you through all the steps necessary to complete the installation. More and more Linux apps have a similar install procedure, though I find it about as easy to go to a command line and execute the few commands required to install most software packages (which process also happens to make you look really smart and dorky to bystanders, who watch with fascination as lines and lines of gobbledegook scroll up your screen). On the Mac, you download an install file, click it, and drag an icon from the resulting window into your Applications folder. If you launch the application straight from the icon, it sticks a drive icon for the app on your desktop, and this was sort of confusing at first, but once I figured out what was going on, I found this install process to be pretty intuitive. I suppose it lets you try an application before actually cluttering up your applications folder with it.

ExposéFinding Stuff. I’ve never found finding things on the Mac to be especially intuitive, though I guess it’s similar to the process on a Windows system. There’s always been this sort of abstract thing called the Finder that hasn’t seemed to be very useful. I’d expect to find here a list of open applications that allows me to toggle from app to app (it seems like this may have been part of the functionality years ago). OSX does have, I just now discovered, alt-tab functionality that allows you to toggle among open applications. When I last used a Mac with any regularity, I doubt I even knew about this feature on Windows systems. Again, the aesthetics of even this little piece of functionality are beautiful, with transparency, nice big icons, rounded corners, and a fade effect when it disappears. What the Mac does have now is a dock that displays pretty clearly what applications you use most frequently, which ones are open, and which ones you’ve minimized. The dock can be moved to either side or the bottom of your screen, and you add things to it by dragging to it, removing them by dragging them to the trash. As far as finding files, there’s a find dialogue, but because OSX has FreeBSD running under the hood, you can also use standard find syntax (“find /Users -name office.jpg”) at the command line. All in all, though the ways of getting at applications and files on the Mac is a little different from what I’m used to, I could get used to it and haven’t found it to be a problem. One really cool feature the Mac ships with is Exposé; if you hit F9, all your open applications are tiled nicely on your screen so that you can see what’s running and click the window you want to give focus to. This sort of replaces the Windows/Linux task bar feature that labels each window for you, and it’s actually much better because it gives you a visual representation rather than text in your taskbar, of which text less and less is visible as you open more and more things.

The Mac's dockWindow Size. This is the biggest strike against the Mac, in my opinion, and it may well be that there’s a setting that lets you get around it. Mac windows have three little bubbles in the upper left-hand corner, a red, a yellow, and a green one. Clicking the red one closes a window or application. Clicking the yellow one minimizes it (which on the Mac makes it disappear from the screen and puts an icon in a separated area of the dock). Clicking the green one seems to maximize the width of the window and to extend the bottom border down to the top of the dock; clicking it again toggles back to the original view. I happen to be greedy for window space. I want my windows to take up the full window so that I can maximize my viewing space. This is especially important in text editors, such as vi, that I use to write code; I need all the horizontal and vertical space I can get so that I can read the maximum possible amount of code. Windows and Linux have spoiled me in this regard because their windows automatically epand to use all space but the sliver of task bar. The dock on the Mac is pretty big, and I lose nearly an inch of vertical space at the bottom of my 17-inch monitor and another quarter inch at the top even when I maximize. Now there are options associated with the dock. You can make it pretty small, and you can set it to disappear when you’re not moused over the area it’s set to occupy. When you set it to disappear, maximizing windows works pretty much as it does under Windows and Linux. But here the aesthetics and the simple functionality of the dock foil you. First off, the dock is a gorgeous piece of UI, and I hate to see it go. Second off, it’s functional insofar as it displays up arrows under each open application and displays in a section on the right which apps are minimized. Additionally, if an application needs your attention (as when somebody tries to initiate a chat in iChat), the application’s icon bounces. So it’s a very functional piece of UI as well, and it’s reassuring to have it down there. I suppose there’s really not a win here. It’s just a matter of personal preference, and I can’t really fault Apple for providing me various options that I’m too finicky to combine in a fully pleasing way. Let’s not call this a strike against the Mac so much as a conundrum its elegance causes that the lack of much in the way of choice in Linux and Windows makes all the more painful.

Administration. I spent probably an hour off and on yesterday trying to get Mleeka’s Windows system to connect to my samba server. I got it to connect, but it didn’t have write access. I finally did get it to use the samba server for printing. But it was a major headache and involved much swearing and waiting for sluggish Windows UI and network, and I finally gave up on the file sharing part. If I knew how to administer a Windows system using simple command line utilities and configuration files, I would have been much happier. Linux is by and large a cinch to admin because it’s simple. There are graphical tools for administering the Mac, but if I ever get lost or frustrated, I can, in many cases, open up a terminal window and find myself at the familiar command line, where I can do simple administration with no headache. To connect my Mac to my samba server, I had only to type “/sbin/mount_smbfs -T 10 //username:password@192.168.1.102/photos /Users/photos” and I was connected, with a drive on my desktop and full read/write capability.

By and large, I’m digging my Mac so far. I ordered the iSight camera, which facilitates pretty darned high-quality video-conferencing with other iChat users who have the camera. That is in fact the primary reason my company bought me the computer. If the system were a little faster, I’d be more inclined to use it as my primary system. Also, if there were more open source software for it that could be installed reasonably easily (maybe there is and I just don’t know about it yet), I’d be happier. I considered trying to install Gimp yesterday because I don’t know of any more advanced free graphical editors for the Mac and because I’m comfortable using Gimp, but it was going to be a real pain, so I didn’t. I haven’t even looked to see if Open Office is supported on the Mac. If it is, I’ll definitely install that. If you’ve got some cash burning a hole in your pocket and are intrigued by Macs, I’d definitely recommend trying one out, especially if you’re tired of Windows but reluctant to toss yourself into the wilds of Linux.

How Fast is Your Browser?

Want to optimize your browsing experience? Check out this pretty comprehensive set of browser speed tests targeting all of the major browsers and some minor ones on Linux, Mac, and PC. If you’re not into reading the tech specs and methodology, scroll down to the bottom for the conclusions. It turns out that Opera is a pretty darned fast browser. Although the author concludes that Mozilla and Firefox are optimized for Linux, it seems to me that Opera wins almost across the board, especially on Windows. Of course, Firefox is free, easily extended, and simple out of the box, so it’s still my browser of choice.

Incidentally, Firefox netted 25 million downloads in 100 days. About 110 days ago, when we on the Spread Firefox crew were trying to project a reasonable download count for 100 days, we landed on 10 million. Similarly, the NY Times campaign wound up raising something like six times what some of us thought we could reasonably expect. It’s amazing how many extra miles the Firefox community keeps going.

Umnounting a Stubborn Share

In order to make sure one of my current projects gets backed up regularly, I keep the files on a server that I mount using samba so that I can access the files as if they’re on my system. This is easier than finding a way to back up my system because I can force the system to mount the share at boot and never have to think about saving the files out (well, except that I’m paranoid and am also keeping versions in CVS [no, not the drug store -- it's a computer dork thing]). Occasionally, samba mounts go haywire, though, and when this happens, you can often un- and remount them to solve the problem.

When I tried this today, I got a “device is busy” error and couldn’t unmount the share even when I tried to force it. I googled for a minute and found this site, which pointed me in the right direction. Although I had checked all my terminals to verify that my cwd wasn’t on the share in question, I thought it’d be good to check and see if there was somehow somebody (me or someone else) using the share. And it turns out that the fuser command allows you to see this sort of info:

[houston]# fuser -vmu /home/files
                     USER          PID ACCESS COMMAND
/home/files          root          1553 ..c..  su
                     houston       9046 ..c..  bash

The “c” beside these entries means that the file system is in question is the cwd for that process. So in these cases, I was in /home/files when I opened a new session (in one case an su and in another a whole other terminal session) from which I then changed directories (meaning that it wasn’t obvious to me that I was actually using the file system because pwd showed me being elsewhere). Once I killed the processes, I was able to unmount the share, and when I remounted, the flakiness was gone. Nifty.

We Have Wireless (At Last)

Getting wireless to work on my new HP Pavilion (zv5320us) turned out to be a much bigger pain than originally anticipated. Try as I might, I couldn’t see my access point. I tried using ndiswrapper to wrap several different drivers with no success. I learned a few new commands, including iwlist, which can be used to scan for access points. My system could see none, though my own router was within four feet of the computer. Finally, it occurred to me to try pushing the little “wireless” button that lies above the function keys. On my last laptop, pushing the wireless button had no effect — wireless was just on. But sure enough, when I toggled the button on and ran iwlist, I could see not only my access point, but two other access points within range. I still couldn’t connect, though. I had been having occasional problems with my access point lately anyway, and so I thought I might as well try to update the firmware, something I haven’t done since I bought the router well over a year ago. And that did the trick. At last, I write this from my couch after much frustration.

New laptop

A few weeks ago, my laptop started spontaneously shutting down. It did this a few months ago, and I sent it in for repair. All was well for a while. The day after I got it back this time, it shut itself down again. Sometimes it does this from a cold boot and sometimes after the system’s been up for a while. Best Buy sent it off for nearly three weeks, and they replaced the fan, cleaned things up, etc. Since it does it from a cold boot, we figured that it’s probably a motherboard issue rather than a cooling issue, and so I made them swap the laptop out for a new one. The one I really wanted, which looked and felt very much like my old one, wasn’t in stock. So I got the HP Pavilion (zv5320us) with widescreen display, on-board wireless, CD/RW, etc. It’s just a slight step up in some regards from my old system, though it’s a lot bigger. It also turns out that it’s a much bigger pain to put Linux on it than it was on my last system. So I’m briefly documenting the process for future reference.

I put Fedora Core 3 on this thing, figuring it’d be as easy an install as Fedora Core 2 was on my other system. The problem lies not in the transition between Fedora Core 2 and 3 but in the hardware on the new system. First off, the touchpad didn’t work, so I had to negotiate my screen using keys. Which is fine, but which isn’t good in the long term. So I spent a half a day trying to figure out how to get the mouse to work. Eventually, I downloaded the Synaptics driver rpm and installed that. I also downloaded the source, which has a patch for the ALPS driver that apparently powers my touchpad (as using just the synaptics driver didn’t do the trick). I wound up having to download a new kernel, patch in the ALPs driver, and proceed from there. I had never done a kernel update before, so it was intimidating but turned out to be pretty easy. I started the kernel build as follows:

rpm -ivh kernel-2.6.9-1.678_FC3.src.rpm
cd /usr/src/redhat
rpmbuild -bp --target=i686 SPECS/kernel-2.6.spec

Then, I copied the alps.patch file from the synaptics package into /usr/src/linux/drivers/input/mouse and applied it by executing “patch < alps.patch." I'm not sure whether or not I needed to do this (probably not), but I added "modprobe psmouse" to /etc/rc.local to make sure the mouse would load. Once I got all this done, I went into the kernel source directory and did "make && make modules_install && make install" to actually update the kernel. That took an hour or two. When I rebooted afterward, I had a working mouse. The motion was very slow, however. I'd be zipping my finger all over the touchpad, but the mouse would just creep along. So I tweaked /etc/X11/xorg.conf. My config is as follows:


Section "ServerLayout"
...
InputDevice "Synaptics Mouse" "AlwaysCore"
EndSection

Section "Module"
...
Load "synaptics"
EndSection

Section "InputDevice"
Identifier "Synaptics Mouse"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "14"
Option "FingerHigh" "15"
Option "MaxTapTime" "180"
Option "MaxTapMove" "110"
Option "EmulateMidButtonTime" "75"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.32"
Option "MaxSpeed" "0.52"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
Option "Repeater" "/dev/ps2mouse"
EndSection

Next came fixing the monitor up. The laptop has a widescreen monitor, and so the default aspect ratio caused a vertical scroll and obscured the toolbars. I spent hours on this issue and finally did just the right Google queries to produce several sites whose tips I glommed together to find the right solution. I learned about a command line utility called "gtf" that generates a modeline for the monitor. The modeline is defined in xorg.conf and tells your monitor when and where to fire pixels; if you have the wrong modeline, you can screw your monitor royally. To find the specs for your monitor, just type "gtf screen_width screen_height refresh_rate" (so "gtf 1280 800 75" for example) and paste the resulting line into the appropriate spot in xorg.conf. I was unable to get the nv driver to work properly, so I downloaded and installed the nvidia driver and added "modprobe nvidia" to /etc/rc.local and changed the appropriate line in my conf. This got rid of the vertical scroll, but it also caused the screen image to shrink, leaving a black margin at the right of the display. So I kept googling and found a reference to the option "IgnoreEdid," which I added to my conf. This caused the display to stretch to its correct width but to be doubled vertically and to be grainy and weird looking. To remedy this, you just make sure both the Vsync and Hsync in your modeline are negative (one of them was positive in my original modeline). This made the display fit the screen, but it was still grainy and oddly colored and had some pixels blinking. So I googled some more and found an xorg.conf whose monitor section made my monitor work like a charm. Here's hoping it doesn't get fried later. Here's the relevant portion of my xorg.conf in its currently operational state:

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "HP D2806 Ergo Ultra VGA 15-inch Display"
        HorizSync    31.0 - 100.0
        VertRefresh  59.0 - 76.0
        #Modeline "1280x800_75.00"  107.21  1280 1360 1496 1712  800 801 804 835  -HSync -Vsync
        #Modeline "1280x800"  107.21  1280 1360 1496 1712  800 801 804 835  -HSync -Vsync
        Modeline "1280x800" 83.91 1280 1312 1624 1656 800 816 824 841 -HSync -Vsync
        #ModeLine     "1280x800" 85.7 1280 1360 1496 1712 800 801 804 835
        Option      "dpms"
        Option "IgnoreEdid" "1"
        #UseModes "16:10"
EndSection

Section "Device"

        #Driver      "nv"
        Identifier  "Videocard0"
        Driver      "nvidia"
        VendorName  "Videocard vendor"
        BoardName   "NVIDIA GeForce 4 (generic)"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     16

        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "1280x800" "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Next, I move on to wireless. The system has a Broadcom chip, so I've installed ndiswrapper, but I think I've got the wrong Windows driver installed, as I get an error unsetting an encryption key when I try to start the wireless network. Finding the right driver for this should be a cinch, though, and I hope to have wireless up and running soon.

Some links that proved most helpful in setting all of this up include the following:

Firefox on Linux Install Instructions

Ben Goodger takes a tongue-in-cheek jab at Linux in his Firefox on Linux Install Instructions posting, providing a three-step install process wherein the final step is “Give up and reboot to Windows.” He proposes wrestling with File Roller to extract the tar.gz file, but there’s a much easier way for those who are willing to brave the command line:


[houston@localhost src]$ tar -xzvf firefox-0.9.1-i686-linux-gtk2+xft-installer.tar.gz
[houston@localhost src]$ cd firefox-installer/
[houston@localhost firefox-installer]$ ./firefox-installer

Mine too is a three-step process, but it sidesteps the File Roller awkwardness and gets you up and running quickly (the last step launches the graphical installer, and you’re free to ditch the command line interface after executing it). If you use tab-completion to avoid typing out the long filename, it’s even quicker. :)

Wine

A friend of mine got me interested in wine a couple of years ago. He’s what you might call an armchair connoisseur (of wine, not of armchairs); that is, he knows a fair amount about wine and how it’s made and how to tell the different varietals apart, but he’s not one of those people who can swish a mouthful of vintage around and tell you which small vineyard in France the grapes came from. Nevertheless, he taught me everything I know about wine (not much, but that’s my fault and not his), and with his help, I’ve gone from thinking wine tasted bad (my sweet palate accustomed to and expecting something more like Welch’s grape juice) to really sort of liking it. I prefer the bitters to the sweets; a good Shiraz beats a fruity Riesling any day.

But it’s not that Dionysian beverage I ultimately wish to focus on here. It’s my own connoisseurship of another thing entirely, without which none of us could even speak about the things we value. Namely, and to quote Hamlet, “Words, words words.” For years, I’ve had a healthy obsession with words and their etymologies. I call it healthy because it doesn’t interfere with my daily life, because I have maybe 8 or 10 non-dictionary/thesaurus books dedicated to word origins rather than whole shelves full. I consider it healthy because I’ve lived a period of about two years during which I had no access to my copy of that venerable old reference work the Oxford English Dictionary. If the word monkey on my back were too furious and insistent, I would surely have caved in and repurchased the OED during that period of deprivation.

While I would love to own the full twenty-some volume set of the OED (or at the very least the two-volume set that comes with a big magnifying glass), I can hardly complain about a lexicographical deficiency when I do own the OED on CD-ROM. My parents bought this for me when I was in college (they were the worst sort of enablers). And I happily used it for years. Windows 95 was the standard PC operating system for individuals at the time, and the software ran wonderfully in that system. With just a few keystrokes, I was able to discover that the word “elephant” may have come from an old Teutonic/Slavic name for camel (olfend) or that the evil eye can also be called the “jettatura” (from an Italian word). But then came the new millennium and a spate of new operating systems. I used Windows 98 for a while and then moved, briefly, to the factory install of Windows Me, which caused all sorts of problems for my computer. Whether it was with that OS or with the later installation of Windows XP that my OED became obsolete I can’t remember; but at some point a couple of years ago, my OED was no longer functional on any computer I had.

I wrote the loss off to progress. My interest in words hadn’t really waned, but because I was out of school and had a job that didn’t have much to do with words for their own sakes, my focus had changed. And I did still have those eight or ten books I could go to if the history of a word was especially elusive. (Between those and a pocket American Heritage Dictionary, I was able to discover that the word “demijohn” comes from the French phrase “Dame-Jeanne,” or “Lady Jane,” presumably because the shape of a demijohn is similar to the shape of a centuries-ago French lady in her hoop-skirted dress.) I did nevertheless occasionally lament the loss of my dictionary.

The other day, while talking with a coworker about software incompatibilities, I brought up my loss of the OED as an example of one tragic side-effect of such incompatibilities. Since that loss, I have become a Linux user through and through (yet more progress). I cringe at the thought of booting into a Windows system. And my like-minded coworker knows this. So he mentioned a program for Linux called WINE that might be of some use to me. I had heard of the program but had never had good reason to use it. WINE, which I believe stands for “Wine Is Not an Emulator” (in the best geek tradition of recursive acronyms), provides an abstraction layer that allows Linux users to run many Windows programs on their Linux systems. What’s more, it allows you to select the Windows version you wish to run. And best of all, as with much of the software written for Linux, WINE is absolutely free.

So I installed a copy, dug up my OED software and data CD, and got it running successfully on my Linux laptop. And voila, I have my precious OED again. At my fingertips are multifarious words such as multifarious (having great variety or diversity), multifid (having many divisions [rather like the Windows security vulnerability list]), mutessarif (In the Ottoman Empire and Iraq, a governor of a province), and mydaleine (a poisonous ptomaine [the generic name of certain alkaloid bodies found in putrefying animal and vegetable matter, some of which are very poisonous] obtained from putrid flesh, etc.). Knowledge is bliss (a good Germanic word), it turns out.

Furthermore, because of the way WINE masks the Linux file system as a WIndows file system, I was able very easily to fake a CD-ROM drive, copy the data file into the directory mapped to the drive letter, and use the dictionary without having to cart the CD around.

And so it turns out that I am, after all, somewhat of a connoisseur of WINE, a software package that has, to use an old phrase, left a most pleasant taste in my mouth.