Friday, July 28, 2006

Something Other than Brown

Ubuntu uses the Gnome Display Manager (GDM) as its login program. There's nothing wrong with that, except that the default Ubuntu login them is something called Human. The only thing special about Human is that it's brown. How brown? Well, I just spent a week in Western Kansas in July, and it's browner than that. It's ubiquitously and irredeemably brown. Brown, Brown, Brown. As boring as the background to this blog, as a matter of fact.

Fortunately, others have noticed this and provided information on how to fix the problem. The solution given on the quoted page gives you directions if you use the Gnome desktop. I, of course, use FVWM, so I can't just follow along with the menu as described in the link.

So the procedure is as follows:

  1. Go to gnome-look.org to find a login screen you can live with — OK, you can probably make your own, but I don't know how to do that yet. Given that it's Friday night, I chose a Stargate SG-1 theme.
  2. Download the theme, which will be in .tar.gz format, to someplace in your file-system where it won't be disturbed. I created a directory called /home/local/share/gnomelogin to store themes.
  3. Run the gdmsetup program. Use either
    $ sudo /usr/sbin/gdmsetup
    from the command line, or add the line
    + "Login (GDM) Manager" Exec exec gksudo /usr/sbin/gdmsetup
    to some menu in your ~/.fvwm/.fvwm2rc file and click on that.
  4. When the gdmsetup window appears, you'll see a list of default themes. IF you like one of them, click the radio button. Otherwise, click the "Add" button and give the program the path to your favorite downloaded theme.
  5. Note that you can choose multiple themes which will be brought up randomly (click on the bar beside the word Themes:)
  6. You can also change the login message.
  7. Log off of FVWM (or whatever window manager you are using. The new theme should appear as your login window.

Thanks, of course, to The Linux Extremist.

P.S. There are more themes on Freshmeat.

Friday, July 14, 2006

Emacs Soft Line Wrap

Today I had to fill out a few forms at work. Web-based forms, requiring long paragraph answers to certain questions.

So naturally I used Emacs (the One True Editor) to edit the paragraphs, then cut-and-pasted them into the web.

The result looked like pure crap. Why? Because I'd set Emacs to wrap lines after 68 characters (trust me, this is exactly the right number). Emacs, in its text-based wisdom, presumes that everyone I'm sending the document to will want to see it wrapped at 68 characters, so it inserts hard carriage returns at every word wrap.

This meant that every time a line extended beyond 68 characters
Emacs put in a carriage return, which the idiot web-based form
input program interpreted as meaning that it should put in a
hard return as well.

Just like that last paragraph. Annoying, huh?

So I had to edit out all of the returns by hand. An annoying task, though it wasn't all that hard with Emacs' macro feature.

Then today I found the answer to my prayers (I pray about very minor things sometimes) in Penguin Pete's Blog. It's an Emacs Lisp script (if you don't know, don't worry) that inserts 'soft' line breaks. That is, it wraps words on the screen, but not in the file. Pete explains how to set it up, all you need is longlines.el, the basic script, and a few lines in your ~/.emacs file.

A couple of additions to what Pete wrote:

  • If you edit program files, e.g. Fortran code, you'll want to turn off the longlines mode before you edit the file. I expect that there is a clever way to do this, but I've got no clue how. So I commented out the line:
    (add-hook 'text-mode-hook 'longlines-mode)
    Now when I want to edit a file and use soft line wrap, I just open the file normally, and then enter
    M-x longlines-mode to toggle the longlines mode on (or off). (For Emacs novices, M-x means "meta-key x." This usually means holding down the "Alt" key and pressing the "x," but you can also press "Esc," release, and then press "x."
  • You can byte-compile the script and then put it into the ordinary list directory. Just enter
    M-x byte-compile-file,
    give Emacs the location of longlines.el, and press return. The file longlines.elc will be produce in about a second, and you can then copy it wherever you please.
  • Blogger itself has some issues with hard line wraps, especially if the wrap occurs in the middle of an HTML command. So this is especially nice for writing long Blogger posts and then cutting and pasting them into Blogger.

Thanks again to Penguin Pete for pointing this out.

Wednesday, July 12, 2006

Advice for IE Users

Most readers of this blog use something other than IE to surf the web. (Currently only 19% use IE here, down to 2% over on Working With Fedora.)

However, the Linux & Things staff does not discriminate against IE users. All are welcome here.

Other sites, however, are not so tolerant.

Saturday, July 08, 2006

Weird Search

The Site Meter Icon on the RHS of this blog keeps a record of recent hits on Linux & Things. At the top right now, I kid you not, is a Google Search on Shadrack, Meshack & abendigo song for kids sing along. It boggles the mind. Especially since we both had to misspell Shadrach in the same way. But my spelling mistakes aside ...

A kids sing-along about three guys getting cremated? The mind boggles.

Oh, OK. Let's try it. You know the tune:

Old King Neb built a golden statue
Old King Neb built a golden statue
Old King Neb built a golden statue
Ear-lii in the Morn-ing

Said we had to bow down and worship
Said we had to bow down and worship
Said we had to bow down and worship
Ear-lii in the Morn-ing

We said that we would never do it
We said that we would never do it
We said that we would never do it
Ear-lii in the Morn-ing

Chal-deans came up to de-nounce us
Chal-deans came up to de-nounce us
Chal-deans came up to de-nounce us
Ear-lii in the Morn-ing

Neb said we had to burn in the fur-nace
Neb said we had to burn in the fur-nace
Neb said we had to burn in the fur-nace
Ear-lii in the Morn-ing

In we went to the fir-ey fur-nace
In we went to the fir-ey fur-nace
In we went to the fir-ey fur-nace
Ear-lii in the Morn-ing

Guys threw us in got killed by the heat
Guys threw us in got killed by the heat
Guys threw us in got killed by the heat
Ear-lii in the Morn-ing

But for us it was all quite comfy
But for us it was all quite comfy
But for us it was all quite comfy
Ear-lii in the Morn-ing

Not quite as hot as Washington in August
Not quite as hot as Washington in August
Not quite as hot as Washington in August
Ear-lii in the Morn-ing

God came down to vis-it u-us
God came down to vis-it u-us
God came down to vis-it u-us
Ear-lii in the Morn-ing

King Neb saw that we were not burn-urn-urn-ed
King Neb saw that we were not burn-urn-urn-ed
King Neb saw that we were not burn-urn-urn-ed
Ear-lii in the Morn-ing

He let us out of that darn ol' fur-nace
He let us out of that darn ol' fur-nace
He let us out of that darn ol' fur-nace
Ear-lii in the Morn-ing

Now we've got cushy jobs in Bab-uh-lon
Now we've got cushy jobs in Bab-uh-lon
Now we've got cushy jobs in Bab-uh-lon
Ear-lii in the Morn-ing

So trust in God and you'll stay heal-thy
So trust in God and you'll stay heal-thy
Even in-side that fir-ey fur-nace
Ear-lii in the Morn-ing

Well, OK, it's got a beat, and but you can dance to it?

Thursday, July 06, 2006

Thunderbird In Plain Text

This is one of those "I need to write this down because I'll otherwise forget it" posts. (After all, that's the justification for this blog.) If you're not interested in fixed-width-font email, move on, nothing to see here.

Why fixed font email? Well, I belong to a baseball analysis email list, and sometimes we want to exchange tabular data. It's always easier to read if you know the width of the tabs. And I grew up with mail read from the command line, or in Emacs.

Besides, HTML email is annoying. Really. Especially when the font is nearly the same color as the background.

So how to set this up in Thunderbird? Well, Mozilla gives you the basic directions. The only thing you have to remember is that in Linux the Account Settings option is under Edit (Why? Who Knows?) instead of under Tools. So the proper string in Edit > Account Settings > Composition & Addressing > Click "Compose in HTML" Off.

I'll ignore the rest of the article because I occasionally want to forward emails as attachments or otherwise add MIME features. I just want my regular emails to be fixed in place.

Tuesday, July 04, 2006

The Endless Testdrive

Over on the right-hand side of this page is a new icon that says "Keep the Car." This is a new promotion from OpenOffice.org, in response to Microsoft's Office 2007 (or 8) test drive program (IE and ActiveX required, sorry). The point is, of course, that OpenOffice.org is available right now, and is forever free.

I use OpenOffice at work to read Microsoft Word and PowerPoint documents when I'm on my Linux box. For Excel spreadsheets I usually use gnumeric. And it works fine for that. In fact, if everyone used OpenOffice, there'd be no problem. But when I want to present something to the higher-ups at work I used Word or PowerPoint on the Mac, because that's what they use and OpenOffice doesn't supply the same bells and whistles that PowerPoint does.

If I could change this, I would, but this reliance on the Mac/Microsoft Office package goes all the way to the top of the organization, well beyond where I work. I'm never going to have enough power to change that.

But if we start using OpenOffice.org for everyday presentations, in email, etc., ("Oh, it didn't display well in PowerPoint? Well, I used OpenOffice to create the file, and it's free. You can get it from http://why.openoffice.org/.") then it'll be like the way Arlo said at the end of Alice's Restaurant:

You know, if one person, just one person does it they may think he's really sick and they won't take him. And if two people, two people do it, in harmony, they may think they're both [nerds] and they won't take either of them. And three people do it, three, can you imagine, three people walking in [using OpenOffice.org] and walking out. They may think it's an organization. And can you, can you imagine fifty people a day, I said fifty people a day walking in [using OpenOffice.org] and walking out. And friends they may thinks it's a movement.

P.S. Thanks to Ron Pegoraro (Washington Post) for pointing out the new OpenOffice.org ad.

Monday, July 03, 2006

Ubuntu for the Power Geek

My, how much you can look up on the web when you're sick. Anyway, Mark Pilgrim is geek type who has just switched to Ubuntu from Mac OS X. (Gasp!) It's even made Slashdot.

Yawn. I doubt Steve Jobs will have trouble sleeping tonight.

What's interesting about this is that Pilgrim has a list of essential software. It starts with Ubuntu, and has a lot of the programs we've mentioned here over the past 2-½ years, plus more. That's worth a look.

Thunderbird, Firefox.
Firefox, Thunderbird

Once you've gotten everything set up with Thunderbird as your emailer, you need to get it talking nicely to Firefox, and visa versa. That is, when you have an HTML link in Thunderbird, clicking on it should bring up the link in Firefox. And clicking on a mailto link in Firefox should bring up a composition window in Thunderbird.

Doing this while running a GNOME or GNOME compatible desktop such as FVWM is easy:

  • From a text window run
    $ gnome-control-center
  • Click on Preferred Applications
  • Click on the Internet tab.
  • Choose the default web browser and email client from the menus, or type the address in the box, if needed.

I suppose there's a similar thing you can do under KDE, but I'm not all that familiar with the system.

You can also hard-wire the behavior into your browser by editing the user.js files. That is, edit

~/.mozilla/firefox/xxx.default/user.js

so that it contains the line

user_pref("network.protocol-handler.app.http","/usr/bin/firefox");

and edit

~/.mozilla-thunderbird/xxx.default/user.js

so that it contains the line

user_pref("network.protocol-handler.app.mailto","/usr/bin/mozilla-thunderbird");

(xxx.default is actually a random string assigned by Firefox and Thunderbird)

This marries Firefox and Thunderbird, they're linked together, and GNOME cannot pull them asunder.

Evolution to Thunderbird: Migrating

Well, that wasn't hard, really. I just followed these instructions, which basically say that you copy files from the ~/.evolution directory into the ~/.mozilla-thunderbird directory. Note that Evolution no longer calls all its mailboxes "mbox", the Inbox is called Inbox, and its subfolders are located in the directory Inbox.sbd. I basically did a mass copy and deleted all of the summary and index files.

As for the address book, well, it's a mess. Evolution only exports to something called vcard. Well, not quite true, it tries to export to CSV (comma separated values), but it doesn't do well. Thunderbird will import CSV's, but doesn't get everything correct. There are various attempts on the web to fix this, but they're all cumbersome. So what I've done is export Evolution's email to VCARDs, which I can read, and I'll rebuild the Thunderbird's address book by hand. Not the optimal way to do things, but that's the way we'll go.

One more thing: you'll want to install the Thunderbird Signature Switch Extension.

Now to change all my "mail" references in various menus from evolution to mozilla-thunderbird.

Thunderbird Needs to Evolve

Ugh. I've got a cold which is just bad enough to make me feel listless, but not so bad that it actually knocks me out. So, even though I'm taking sick leave today, I've got to do something.

And what I want to do is to replace my Evolution email client with Thunderbird, the email companion to the Firefox web browser.

Evolution's worked pretty well for me, but every since I've been using Ubuntu it occasionally gives me an error message that goes something like "Summary and folder mismatched, even after a sync." When I quit Evolution, I find that it hasn't marked the email I've read as read.

There is no fix for this, and no one's inclined to fix it. Look for the quote "A solution has been found so medium priority again now." The "solution" mentioned here is to delete the summary files and let Evolution rebuild them! Since the summary files are buried deep in the ~/.evolution directory, it's not something you want the average user to do.

After I upgraded to Dapper the messages didn't go away, entirely, but Evolution seems to fix itself after a bit. Nevertheless, it's annoying. Besides, I use Thunderbird at work and find that its Spam Filter is very good, and, unlike Evolution, it will let me consign messages to the Spam box without having to open them up.

But there's a complication. Here I home I use two email services: the one from Comcast, for email from family, friends, and creditors, and Gmail, for those situations where I might want my address to be made public (e.g., this blog). Using Gmail+Thunderbird or Evolution eliminates about 95% of all spam, and so far I've never seen a false positive.

So what do we have? Two POP mail spools that need to be checked, mail.comcast.com and pop.gmail.com, and two SMTP servers to push the mail, smtp.comcast.net and smtp.gmail.com. Comcast (and probably your ISP as well) is pretty good about telling me how to set up Thunderbird, as is Google. (Look at the Gmail instructions, as non-standard ports are used both the send and receive mail.) And, like Evolution, Thunderbird will read from multiple accounts, and, supposedly, send from multiple SMTP servers.

It's the supposedly above that hints at the problem. Evolution sends email with my Comcast address via smtp.comcast.net, and email from my Gmail address through smtp.gmail.com. That's exactly the way it should work.

By default, on the other hand, Thunderbird uses the Default account for all outgoing email. No, that's not quite right. It uses the first SMTP account in its list to send email, even if another account is marked Default. Someplace in the documentation it even says that to use the server you want you should delete all other SMTP servers from your account.

However, you can actually associate an SMTP server with an email account. The directions aren't quite right for Linux where you first set up the SMTP servers by going to Edit => Account Settings => Outgoing Server (SMTP) =&; New and enter the SMTP information. The go to Edit => Account Settings, click on the first line of the mailserver you want, and select the proper SMTP server for that account.

This works, so I think I'm going to switch over to Thunderbird, but first I have to figure out how to migrate by Evolution mailboxes and address book over to Thunderbird.

And that's for another post.

Sunday, July 02, 2006

Next, He'll Program Your VCR

With thanks to Wired Blogs' Ryan Singel and Kevin Poulsen. we present Alaska (R, of course) Senator Ted Stevens' description of the Internet:

There's one company now you can sign up and you can get a movie delivered to your house daily by delivery service. Okay. And currently it comes to your house, it gets put in the mail box when you get home and you change your order but you pay for that, right.

But this service isn't going to go through the internet and what you do is you just go to a place on the internet and you order your movie and guess what you can order ten of them delivered to you and the delivery charge is free.

More From the Incredible Senator Ted ...

Oh, yes, the good Senator was explaining why he opposed the net neutrality bill.