Tuesday, January 31, 2006

More on Choosing a Linux Distribution

Steven J. Vaughan-Nichols has an article on Choosing a desktop Linux distro. It's mostly geared to non-Linux users who want a Desktop that might, or might not, look like Windows. At the end, he suggests that you look at the Linux Distribution Chooser, just like I did.

Saturday, January 28, 2006

Linux Distribution Chooser

Jeez, almost two weeks since the last post. Well, I have been busy with work. No excuse, I know.

However, let's start out slowly:

How do you know which Linux distribution is right for you? Well, you can work by trial and error, or you can go to the Linux Distribution Chooser. It asks a series of questions and then recommends one or two for you to try.

When I took the quiz, it recommended either Fedora Core or Mandriva, with a suggestion to look at SuSE. I used Mandrake, Mandriva's predecessor, for a while, and we use SuSE at work. Based on this limited sample of one (1), it's possible this thing knows what it's talking about. Give it a whirl and leave a comment here.

Monday, January 16, 2006


What's Washington DC really like? Well, you could check what we watch on television. You'd expect shows dramas like "West Wing" and "Commander in Chief" to be popular, right? And Jack Bauer? Sure. Not to mention all of those political talk shows.

So what were the twenty most popular TV shows of the fall? Football. Each and every one. Mostly the Redskins, of course, but throw in an occasional Rose Bowl and a few other playoff games into the mix. There was nothing else.. The top twenty most watched shows in DC this fall were all football games.

Twenty-first? Desperate Housewives, of course. But only because that was the bye week.

The Redskins lost last week. We're returning to running the country.

Be afraid. Be very afraid.

Command Line "mail" with SMTP

Back in the olden days*, when you wanted to send email from a Unix terminal, it went something like this:

$ mail  joeschmo@foobar.net
Subject:  Here's my email

Mom said we should talk more often.  So I'm sending you this email.

And Joe would eventually get the email. (The ^D is Control-D, used to denote an end of file.) Now the nice thing about the old "mail" command is that it would accept anything from standard input. So if I wanted to send Joe a really long email I could put it in a big file, and pipe it into the mail command:

$ cat bigfile.txt | mail -s "Dear Joe" joeschmo@foobar.net


$ mail -s "Dear Joe" joeschmo@foobar.net < bigfile.txt

(The -s indicates that the next entry is the subject line of the email, the subject itself is in quotes to keep the command shell from thinking it's a bunch of options.)

This is fine so long as your local computer handles its own mail. However, these days home users mostly deal with ISPs, who have their own mail systems, which we usually access with an email client that understands the Simple Mail Transfer Protocol. These days, your email clients are usually graphical ones like Evolution, Thunderbird, Eudora, or Mozilla, but the all-you-can-eat text editor, Emacs, also can send mail via SMTP.

The program that can't send mail via SMTP is the old Unix "mail" command. It isn't the fault of "mail" itself, it's the fault of your Linux box. "mail" looks for a program called "sendmail", or its replacement, to send mail through the system. Now most sendmail-like programs assume that your computer, or one on your network, is your mailserver. They don't speak to your ISP via SMTP.

Why do I care? Well, a friend recently asked me if he could generate a file on his computer and send it to another friend without him having to do anything else. On a system with "mail" working, it's easy. Suppose the command "genbignovel" creates a large text file "pulitzer.txt". Then to write the novel and send it to Joe, who's on the Pulizter committee, I could create a small text file:

mail joeschmo@foobar.net < pulitzer.txt

which sends the file to Joe as soon as it's generated. If I'm using Evolution, Thunderbird, etc., then I have to send the file as an attachment, which means a bunch of mouse-clicks, at the very least.

So what we need is a replacement for sendmail which understands SMTP. A Google search reveals many, but the most popular one seems to be msmtp. I decided to try it out, so I downloaded the file, installed it using checkinstall, and tried to figure out how to set it up.

It's not too hard, though most people seem to use msmtp with mutt rather than mail. First, you need to create a file to tell msmtp which SMTP server you want to use, and the information needed to access that account. This is done through a file called ~/.msmtprc, i.e., a file named .msmtprc that lives in your home directory. Here's mine, with a few obvious changes:

account default
auto_from off
host smtp.gmail.com
from dubya@gmail.com
auth on
password xyzzymouse
user dubya@gmail.com
tls on

This obviously works on gmail, but you should be able to modify it for any SMTP server. You can look at the msmtp manual to see what everything means.

Now how do I get "mail" to use msmtp? Simplicity itself. mail uses a command file called ~/.mailrc. Create it, if you don't have one yourself, and add a line:

set sendmail=/usr/local/bin/msmtp

if you put msmtp in /usr/local/bin.

And now mail should work. It does from here, anyway.

Good God, how many posts of mine start with "back in the olden days?" Must remember that not everyone sent their first email in 1983.

Another Windows Alternative

Not too long ago, I pointed out that there are alternatives to Windows. In particular, I was talking about Linux and Mac OS X, but I could also have mentioned Fee BSD Unix and even GNU Hurd. Uh, OK, at the moment it helps to be a techie to work with BSD, and you have to be an extreme geek to work with Hurd. But other alternatives exist. All, however, are based in some way or another on Unix. Which means that your Windows applications won't work, unless you use something like WINE, which implements the Windows API on a Unix-Like OS.

A passing reference on Slashdot led me to another alternative, ReactOS. This is a complete implementation of the Windows API without the Unix backdrop. In other words, it functions as a Windows XP clone, though the developers would hate for me to call it that.

Why would anyone want such a thing? After all, Windows comes installed on 95% of the PCs sold on the planet, so it's not like you can't get it easily. There are several reasons:

  1. It's open source. You can examine it for bugs. When ReactOS is fully functional, it's likely that it will be more secure that Windows, since there will be more eyeballs looking at the code. Now this doesn't mean it will be totally secure. The WINE developers, at least, try to implement Windows bugs. This is done so that software which takes advantage of these "features" will run under WINE. To the extent that ReactOS follows the same policy, there will always be the chance that an XP bug will take out a ReactOS system.
  2. Versatility. Since it's open source, it should be possible to pare the system down to run on an older PC.
  3. Some people just don't like Microsoft, but tolerate Windows better than a Unix environment. Unlike me. I really like Paul Allen. (I'm required to say that as part of the terms of a bet on Saturday's game.) ReactOS lets you run in something like Windows.
  4. Windows Vista. The next version of Microsoft's OS will probably require hardware upgrades. Having ReactOS around will ensure that there is a supported Windows XP work-alike that will run on your current system.

That said, ReactOS is still in the alpha stage, which means it's not really ready for field testing yet, much less critical applications. But it's something to keep an eye on if you want to stay with Windows but don't want to stay with Microsoft.

Oh, if you do upgrade to Vesta and upgrade your hardware, your old system is still usable. Under Linux, at least. If you don't want to use it, let me know. I'm looking for another cheap (aka free) box that I can use to test different Linux distributions. If you don't want to give free things to an unknown Blogger, consider donating the machine to charity with Linux installed.

Wednesday, January 11, 2006

Windows from a Linux Point of View

We've all heard people say "Linux is too hard to install." OK, if you're used to using pre-installed Windows computers, sure. But suppose you were a Linux user and wanted to, for frak's sake, install Windows on your computer. I know, I know, but just suppose ...

Switching to Windows: Not as easy as you think is Mad Penguin's treatment of Windows as just another OS you have to install yourself ...

Found this on Slashdot, where the conversations quickly degenerated into "Oh, Gahd, you have no idea how to install Linux."

Sunday, January 08, 2006

Five of Twenty-Four

Well, Kansas beat Kentucky, 73-46 yesterday. This makes KU's overall basketball record against UK 5–19. Bill Self, with a record of 2-0, thus becomes KU's winningest coach against UK. (Now only if he could beat Bucknell.)

Unfortunately, I didn't see the game, as I was busy preparing to watch Washington's defense advance in the playoffs. Unfortunately, the offense will have to play Seattle next week as well.

Saturday, January 07, 2006

Positioning Firefox in FVWM Windowspace

Finally, I've figured out how to get FVWM to put the Firefox browser where I want it when I start up my system.

A little background. As you probably have figured out by now, I use FVWM as my Window Manager in Linux. It's endlessly configurable, and does exactly what I want it to, when I want it, independent of what someone else thinks should be the default behavior of by desktop.

And yet, ...

Some applications are easy to position on an X11 desktop. For example, open a shell window, and run this command:

$ xterm -geometry 80x25-0-0 &

You now have a terminal window in the lower right corner of your screen. It's 80 columns wide and 25 rows wide. If you'd try

$ xterm -geometry 80x25+100-50 &

the window would appear 100 pixels from the left edge of your screen and 50 pixels from the bottom.

The old Mozilla browsers used to obey this type of command, but neither Mozilla, Netscape, nor Firefox do anymore. This presents a problem. When I log on to this machine, I open and FVWM desktop which is 9 times bigger than my terminal screen. I'd like specific applications specific places when I log on. If you excuse my ASCII art, I'd like the thing to look like this:

|       0,0|       1,0|       2,0|
| Evolution| Emacs    |          |
|          |          |          |
|       0,1|       1,1|       1,2|
| Firefox  | Ical     |          |
|          |          |          |
|       0,2|       1,2|       2,2|
|          |          |          |
|          |          |          |

Where Evolution is my mail client, Emacs my editor, Firefox my browser, and Ical is a calendar program, though probably not the one you're thinking of. Each square, of course, represents a physical screen on the 3x3 virtual desktop. I can switch between them by scrolling the mouse past the edge of the screen.

Now Evolution starts at the first page of the virtual window, so I can just call it up in the usual manner. Emacs and Ical recognize the geometry command. I've got 1024x800 resolution on my screen, I can get these three programs to start up where I want them by adding this to my ~/.fvwm/.fvwm2rc file:

AddToFunc InitFunction
+ I Exec evolution &
+ I Exec emacs -fn 9x15 -geometry 81x42+1264+25 -T emacs &
+ I Exec ical -geometry +1024+800 &

But what about Firefox? If it respected the geometry option I could add another line:

+ I Exec firefox -geometry +0+800 &

But Firefox doesn't use -geometry. So what to do? For years I've brought up Firefox after I logged onto my system, insuring that it would go where I wanted it.

Today I found out about a FVWM command called StartsOnPage. It tells FVWM to start a certain "Style" of command on a specific page on your virtual desktop. See those little numbers in my desktop picture above? 2,2 is the lower right-hand screen, 1,0 the middle screen on the top, etc. I want to put Firefox in screen 0,1. This involves StartsOnPage, but I didn't know how. Then I found this post, which explains all, or at least enough for my purposes. What I need to do is make sure my ~/.fvwm/.fvwm2rc file has the lines:

Style Gecko StartsOnPage 0 1, SkipMapping

AddToFunc InitFunction
+ I Exec evolution &
+ I Exec emacs -fn 9x15 -geometry 81x42+1264+25 -T emacs &
+ I Exec ical -geometry +1024+800 &
+ I Exec firefox &

The "Gecko" style should work with Mozilla, Netscape, Galeon, ..., any Gecko-based browser, which includes Firefox. The "0 1" means start in window 0,1 on the above grid. I'm not sure what SkipMapping does, but it doesn't seem to hurt anything.

And now, when I log on, Firefox appears where I want it.


Monday, January 02, 2006

Updating a Firefox Theme

Last post, as you may recall, I was having trouble with Firefox 1.5 hanging up my X11 session in Windows. Since fixes for the problems in 1.5 had been put into the nightly builds, I downloaded the January 2 build and replaced FF1.5 with what is formally known as Deer Park Alpha 2.

Now running Alpha releases is generally not considered a Good Thing, but I wanted something more cutting-edge than Fedora Core's current 1.0.6 version of Firefox, and the downloaded version of 1.5 just wasn't working well. Maybe, when Fedora releases 1.5 into the regular updates, the bugs that annoyed me will be removed. For now, though DPA2 seems to work just fine. Of course, if I downloaded the nightly every night, eventually I'd probably hit one that destroyed all of the data on my machine. That's the risk in using Alpha software. So instead I'll just use this version until it breaks.

But that's not really what I wanted to talk about right now. My problem is that I like using the Modern Pinball Theme. (A Theme is the background for Firefox — the look of the icons, the color of the background, that kind of thing.) It's neat, has small icons, and generally is presentable enough that you can take it out in public. The problem, however, is that Modern Pinball won't run on a Firefox version > 1.5. Dear Park Alpha 2 lists itself as Firefox 1.6a1, so Modern Pinball refuses to run. Don't blame the developer, he doesn't want to have to keep up with changes in nightly builds. Here, however, there is an easy fix, unless the Firefox people decide to change the theme installation procedure.

So I did a little search and found a page on developing Firefox Themes. I didn't have to read very far. A theme is stored in a ".jar" file, which is identical in structure to a Zip file except that it ends in a .jar extension instead of .zip.

OK, now to find the FF1.5-compatible version of Pinball. It's located somewhere in the .mozilla/firefox directory. So open up an xterm, and type:

$ cd ~/.mozilla/firefox
$ find . -name "*pinball*"

So the extension is located in ./xyzzy.default/extensions/{NNNN}/chrome/modern_pinball-1.5.1-fx.jar, except that xyzzy and NNNN will be something else on your machine. Let's examine file:

$ cd ./xyzzy.default/extensions/{NNNN}/chrome
$ mkdir t1
$ cd t1
$ unzip ../modern_pinball-1.5.1-fx.jar
$ ls -FC
browser/       contents.rdf  help/     install.rdf  preview.png
communicator/  global/       icon.png  mozapps/     reporter/

Use a text editor to look at the install.rdf file. In it you'll find the lines:


Change the second of these lines to read something like:


save, and exit. Now we need to create an new jar file. This way works:

$ zip -9 -r ~/modern_pinball-1.6.1-fx.jar *

This creates a new .jar file in your home directory.

Now, you may ask, how do I get this file into its proper place for Firefox?

Funny you should ask. The aforementioned page includes a an installer form. Download this form to your computer (otherwise it won't work) and open it up within Firefox using the Ctrl-O option. It will prompt you for the location of a .jar file. Point it toward your modern_pinball-1.6.1-fx.jar file and press Install. This should give you a working copy of the Modern Pinball Theme for Deer Park Alpha, aka, Firefox 1.6a1.

Of course, while you're at it, you could change the icons in the Modern Pinball distribution and make your own theme. But I'm not going to try that now.

Firefox 1.5

I got tired of waiting for Fedora Core to move version 1.5 of the Firefox web browser from the development tree into "updates," so I went and installed my own copy, in /home/local/firefox.

When it's launched, Firefox 1.5 (hereafter FF1.5) comes up with an error message,

Firefox could not install this item because of a failure in Chrome Registration. Please contact the author about this problem.

This turns out to be a known bug. The solution (which will be in the next release) is to create a file


after which the error message should vanish.

Other than that, FF1.5 works pretty much like FF1.06. Some of the menu options are a little different, maybe better, maybe not, I haven't decided as yet.

I was going to go on about the wonders of FF1.5, except that in the middle of listing all of the wonderful extensions I loaded up, the browser crashed — not just itself, but X11 as well. I had to do ctrl-alt-F1 to get to a text console, and reboot from there. This happened yesterday, and the day before, and yada, yada, yada. This turns out to be another bug which will be fixed in the next release. It's fixed in the nightly builds, now. (It's a Linux-only bug, apparently.)

But I think I'll wait until then to tell you about the wonders of Firefox.