Archive for the ‘Linux’ Category

How Fast is Your Browser?

February 16th, 2005 by daryl

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

January 5th, 2005 by daryl

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)

December 20th, 2004 by daryl

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

December 20th, 2004 by daryl

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

September 10th, 2004 by daryl

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

May 7th, 2004 by daryl

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.