Saturday, December 30, 2006

Surprise/No Surprise

Surprise (which almost made This Week's Sign of the Apocalypse):

Wikipedia has a Style Manual.

No Surprise (rescuing it from that fate):

You can edit it.

Friday, December 29, 2006

Regeneration Complete, Master

Just like Romana, we've been overdoing the regeneration thing, playing with the New Blogger. Hopefully we're finished for now.

Funny, I still like Romana Mark I best.

Thursday, December 28, 2006

I Hate Character Quizes

You know, answer a few questions, and, in this case, find out Which Fantasy/SciFi Character Are You?

Ψ, I do them anyway:

Which Fantasy/SciFi Character Are You?

That would be Elrond Half-elven.

Damn. I was going for Miles, or Teal'c.

Indeed.

Essential Commands

One of the great difficulties in getting people to learn Linux, or any Unix-like system, is that they think they will have difficulty running programs from the command line. This despite that fact that all computer users of a certain age started out with nothing but the command line — even DOS, after all, was run from a (not-quite) Unix-like shell.

I thought a good way to overcome this phobia would be to list a few of the essential commands needed to operate a Unix shell. Then I started writing. When I got up to one screen per command and hadn't even gotten past the fifth command I decided to stop, cheat, and reference someone else:

Some Basic UNIX Commands by Donald Hyatt. This is a nice list. I only want to add one more command at the moment, though others are free to add more in the comments:

The find command:

Someplace, some time ago, you created a document about the 1985 World Series. You've forgotten exactly where you saved the file, but you're pretty sure the title was something like "The Denkinger Disaster." You might have saved it in Word, Abiword, or OpenOffice.org format. So how do you find the file?

Enter the find command. Given that you're obviously a Cardinals fan, the key word in the title is probably Denkinger. A brief visit to the find man page, and a little bit of knowledge of regular expressions, tells you that the proper command is:

find $HOME -name "*[Dd][Ee][Nn][Kk]*" -type f

which means, "Starting in my $HOME directory and looking in all its subdirectories, look for an ordinary (non-directory) file ('-type f') that has one of the strings DENK, denk, DeNK, DenK, ... in the name. ([] means match any of the characters in the brackets, and the '*' are wildcard symbols.)"

If you have such a file, the find command will print out its location.

I'd give you an example here, but I'm a Royals fan, so no such file exists on my machine.

Tuesday, December 26, 2006

Running New Blogger

For some time, Blogger has been talking about its new, improved version. I've finally switched over. Bear with me while I try out some of the features.

Sunday, December 24, 2006

Setting Up Your New Toy

Getting a new Windows XP computer for Christmas? The Washington Post's Rob Pegoraro wants to talk to you about it in today's Fast Forward column. He notes that "with most new laptops or desktops, the work doesn't really start until after you first turn it on, thanks to the mix of obsolete or useless programs onboard." He then gives a list of things you should add to your machine to protect it, make it useful, and to enable backups. I'm not going to list everything, but here are some highlights:

  • Protect the Computer:
    • Turn on Window's firewall
    • Update Windows and third-party programs that are one or more versions out of date: Internet Explorer, Adobe Reader, Java, Flashplayer
    • Get decent anti-virus and anti-spyware programs. The ones on your computer will expire in a few months. Alternatively, download the Google Pack, which has this stuff.
    • Note that if you have a Mac, turn on the Firewall.
  • Make it Useful:
    • Download Firefox, and use it instead of IE. (Or, alternatively, Opera.)
    • Download Thunderbird, and use it for email instead of Outlook Express. (Or get both Web Browsing and Email in SeaMonkey.)
    • Upgrade Windows Media Player from version 10 to 11, and/or download Apple's iTunes, and maybe go get RealPlayer. If you've got a Mac, you can't play Windows files without something called "flip4mac" from Microsoft.
    • I'd add: if you don't absolutely need Microsoft Office, download OpenOffice.org for all your word-processing, spreadsheet, and presentation needs.
    • Added Christmas 2006: If you look carefully at the sites you browse, you'll see that most of the ads aren't being served from that site. No, they belong to some advertising site that exists only to fill your web pages with garish graphical garbage. You can get rid of these. First, install the Adblock extension for Firefox or SeaMonkey. Then, find Mike's (another guy) Ad Blocking Hosts file and install it on your computer. Adblock stops particular sites/graphics from displaying in your browser, the Hosts file doesn't even let your computer find those sites. (Hey, it's Christmas morning. I did a better explanation of the Hosts file some years ago.) Note: I have not actually tried this on a Windows machine, but it works like a charm in Linux. Any Windows users out there who have tried this?
    • Delete all the trial versions of software you'll never need.
  • Back it up: get a big USB drive, or install backup software to write to DVDs periodically.

Needless to say, these are all good ideas, even if you are going to upgrade your computer to Vista when it comes out in a month or so — at which time you'll need to do all this again.

Funny, though, Linux-nay sayers are always telling us how hard it is to properly set up a Linux machine, that you need a tech support notice to get it working properly. Well, to you think Gran and Gramps, getting their first computer, are going to do all of the above without any help? Nope, their going to turn the thing on and start downloading viruses and Trojans and spyware (Oh My!) as fast as the CPU can push it out.

What's more, there is no central place to find all of that software. Yet every good Linux distribution has all of it readily available. Depending on your view of what's socially acceptable in a Free Software system, you might have to enable a repository or two, but you can get everything you need using yum, apt-get, or some variant, either from the command line or with a graphical interface. And, of course, Linux has all sorts of alternatives for every computing need.

Of course, some things just won't work. That's not a problem for Linux, though. That's a problem for certain companies that don't want to take your money. (No, Macsters, not even yours.) Write them, and tell them they are passing up a quick buck. (Incidentally, the advertisement shown on the page touting this service played just fine with Firefox and mplayer.)

Have fun with your new Windows machine. If, in the future, it gets bogged down, and your friends complain that they get lots of spam with your name on it, remember that there are alternatives.

Things I Never Knew About Firefox

Oy! Didjaknow, if you press the backspace key in Firefox it will take you back to the previous page you'd accessed from your current tab? Just like clicking on the left arrow at the top of the window.

Except that this is currently broken in Linux versions of Firefox, and, by extension, Swiftfox. Fortunately, there's an easy fix, as is pointed out in the article: under about:config, change the value of browser.backspace_action to zero. Thank you, ubuntonista.

P.S.: From the comments, I learn that Alt-Left Arrow also goes back. Logically, Alt-Right Arrow goes forward. Since I'm an old Emacs-do-everything-from-the-keyboard person, I'm mortified that I didn't figure this out myself.

Thursday, December 21, 2006

I'm Not Overweight

I just have very efficient bacteria.

Wednesday, December 20, 2006

Blogiversary

This blog first appeared three years ago today. It started out as A Linux Notebook, and that's pretty much what it still is. There are a few "Things" thrown in here and there just for fun.

So in three years there have been over 12,000 hits on the blog, and 14,000+ on the Linux only extracts from the Fedora Core days. Considering the cross-talk between the two pages, but taking into account the fact that I didn't start keeping count for over a year, I'd guess there have been 15,000+ "unique hits" on this blog, which ain't bad for a farm boy physicist from Kansas whose best-known paper never hit 500 citations.

The most popular topic ever here was on Linux, Firefox, and rtsp, meaning a lot of people needed help with viewing Realplayer videos. Still popular is the mini-tutorial on making transparent png images with the GIMP. The weirdest search was something about "AMITYVILLE HORROR." I can't find the comment I made about it, but a lot of people came looking here for some reason. I hope I helped you all.

The most surprising thing about this blog is that I've kept it up and running for three years. It must mean something to me, though I haven't the foggiest idea what. I have met some interesting people along the way. And I've apparently created a puzzle that no one can solve (hint: it's not a turtle, but it lives very close to one). And, I guess, occasionally I need to write down a few notes about how to do things on this furshlugginer computer.

I guess I'll keep it going for a while. Maybe, in the next few years, I'll get a bit more feedback? :-(

Sunday, December 17, 2006

Dell Dimension Documentation

The none of you that have read this blog from the beginning will remember that my current computer is a Dell Dimension 2350, now a rather old, cheap computer which nevertheless does just about everything I want. I would, however, be happier with more memory, but I didn't remember what the maximum amount of memory for the 2350 was. So tonight I put the string Dell Dimension 2350 into Google™ and found, to my surprise, a link labeled Documentation. It's a link to Dell's online information for the 2350, including such topics as "Technical Overview," "Controls and Lights." "Solving Problems," "Advanced Troubleshooting." "Technical Specifications." "System Setup Program," "Adding and Replacing Parts," and "Documentation." In other words, the manuals that Dell didn't ship. Highly useful, I'd think, and I suppose that there are similar pages for any Dell computer model.

And in answer to my question, the 2350 supports up to 1 GB of memory. I only have 512 MB, so I need to see about upgrading.

Saturday, December 16, 2006

Swiftly, My Browser

I've decided, for the time being at least, not to upgrade to Ubuntu 6.10 ("Edgy Eft"), instead staying with the Long Term Support version 6.06, "Dapper Drake." Nothing particularly against Edgy, just that it's awfully soon to upgrade, even for a former Fedora user. Anyway, there will be another Ubuntu, version 7.04, "Feisty Fawn," available around April. I'll probably upgrade then.

But this failure to upgrade on my part means that I'll be "stuck" with some older versions of software. In particular, Firefox will be stuck with the 1.5 series, although the current release is 2.0.

I wanted to at least try version 2.0. I could download the binaries directly from the Firefox site, but they wouldn't be in Debian package format and wouldn't automatically upgrade. I've heard that there are sites that package Firefox into .deb, but I found that Swiftfox, the Linux & CPU optimized rebuild of Firefox, has its own Debian distribution page. Indeed, by adding the line

deb http://getswiftfox.com/builds/debian unstable non-free

to /etc/apt/sources.list you can auto-upgrade Swiftfox with apt-get or synaptic.

But Swiftfox comes in different versions for different processors. Which one do I have? That's not too hard to find out. The first thing I did was

cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.20GHz
stepping        : 7
cpu MHz         : 2193.109
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips        : 4391.39

which tells me that this is an Intel Celeron (duh), cpu family 15. That's fine, but on its installer page Swiftfox gives me a choice of three Celeron packages:

  • Celeron (Willamette, Northwood, Celeron D), which maps to the Pentium 4,
  • Celeron M, which maps to Pentium-M, and
  • Celeron (Coppermine, Tualatin), which is a Pentium 3 knockoff.

Of course, I know mine is a cheaper version of the Pentium 4, but if you're really curious about your CPU, Wikipedia defines family 15 as the "Northwood" line of processors.

So edit /etc/apt/sources.list, run

apt-get update && apt-get install swiftfox-pentium4

and we're set to go. You may want to do a little tweaking to get all of your pluggins in the right spot, but Swiftfox will run properly.

The best thing about Firefox/Swiftfox is that the browser has a large number of extensions that increase its capabilities. In the 2.0 line these are actually in the Tools => Add-ons menu. Every once in a while I like to take stock of what I have installed, and why. So here goes:

  • Adblock: Lets you remove annoying advertisements, or other junk, from web pages. Highly useful for getting rid of Flash advertisements.
  • BugMeNot: Adds a right-click option which queries the BugMeNot database to find a login and password that works on a site you haven't registered. Not available with the rest of the extensions, you have to look for RoachFiend.
  • Colorful Tabs: Makes the tabs different colors. Not as useful as it sounds, but pretty.
  • CookieCuller: Lets you manage cookies. Specific cookies, e.g. a password cookie for your Google account, can be protected, and will remain when you clean out other cookies
  • Download Statusbar: Highly useful. Replaces the annoying popup window with a bar at the bottom of your browser that fills itself in as you download a file.
  • Forecastfox: Weather information directly on the browser.
  • Sage: An RSS reader that lives in your sidebar.
  • translator: Right-click the little German flag at the bottom of your browser and you can translate the page into the language of your choice. This version lets you open the translated page in a new window or tab.
  • Unread Tabs: Tabs you haven't yet visited are in italics, making them easier to identify.
  • User Agent Switcher: For the brain-dead sites that "require" Internet Explorer but use no other Microsoft software. This makes them think you're an M$ groupie.
  • VideoDownloader: This lets you download videos from YouTube, Google Video, etc. You can view the resulting file with mplayer if you have the proper codecs installed.

Thursday, December 14, 2006

Installing the Intel MKL

Last week I was helping to sort abstracts for the 2007 March Meeting. It's a more or less a tradition, meaning that I can't get out of it until I convince someone else to take over. While I was there, I got into a conversation about electronic structure codes. These are computer programs which more or less accurately solve the Schrödinger equation for the electrons moving in atoms, molecules, and solids. This allows physicists to determine atomic configurations in molecules and solids and to calculate how they would react to external forces. I've used variety of programs in my time, mostly based on the Linearized Augmented Plane Wave (LAPW) method. However, there is another method quite popular with physicists because it is usually faster, but somewhat less accurate, than LAPW, the pseudopotential method. Pseudopotentials are sort of fake atoms, with their shapes fixed up to speed computations.

Some of my colleagues were touting a package of pseudopotential codes called Quantum Espresso (QE). It's released under the GPL, which means you can run it at work, at home, in the car, in the air, etc., without worrying about licensing.

I downloaded the QE code to good old Hal, here. It compiles nicely using version 9.1 of the Intel Fortran compiler for Linux, which is free for non-commercial use. I've discussed how to install the compiler on Ubuntu before. The QE code compiles beautifully and runs quite well.

But it can run faster. Many of the mathematical operations done by QE run more quickly if the code is optimized for the CPU. For Intel chips, this can be done by installing the Intel Math Kernel Library (MKL), which is also free for non-commercial use. But the installation script for MKL/Linux creates and installs an RPM package. You can install RPMs on a Debian system such as Ubuntu, but it's not recommended, since you can't keep it in sync with the Debian package database.

So how to install it? This has bothered others as well. Putting together notes from this forum I was able to figure out the procedure. Now I did this last night and I might have forgotten a step or to, so if I leave something out please correct me:

  1. Download the package from the Intel site and register to get a key.
  2. Uncompress the package:
    tar xvf l_mkl_p_8.1.014.tgz
  3. In the subdirectories thus created, find the install script. Change to that directory and run
    sudo ./install.sh
  4. This will eventually fail, but in the directory /tmp/mkl you'll find a file named intel-mkl-8.1p-14.i386.rpm. If you had a RedHat based distribution it would be installed, but we need to convert it to a Debian package using alien:
    sudo alien --to-deb --scripts intel-mkl-8.1p-14.i386.rpm
  5. This creates a Debian package named intel-mkl_8.1p-15_all.deb that we can install in the standard way:
    dpkg -i intel-mkl_8.1p-15_all.deb
  6. Quantum Espresso automatically finds the package and uses the libraries. For other Fortran programs, say to compile a file named progname.f, you need to do something such as
    ifort -o progname progname.f -L/opt/intel/mkl/8.1/lib/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread
    Programs written in "C" will link in a similar fashion.

I haven't done timings on the difference between QE and QE+MKL, but it seems significantly faster. Now I just have to figure out how to use the code in the way I want to use it.

Tuesday, December 05, 2006

The Real Gates Hearings

Clerk: This meeting of the Senate Armed Services Committee will come to order.

Sen. Warner (R-VA, Chair): Thank you. We are here today to discuss the nomination of Mr. Robert Gates to be the next Secretary of Defense. Mr. Gates, I believe you have a statement.

Mr. Gates: Thank you Senator. Let me state my position: I am not Donald Rumsfeld.

Sen. Warner: Thank you, Mr. Gates. Senator Clinton?

Sen. Clinton (D-NY): Mr. Gates. Do I understand that you are not Donald Rumsfeld?

Mr. Gates: That is correct Senator.

Sen. Graham (R-SC): And you are in no way related to Donald Rumsfeld?

Mr. Gates: No relation, Sir.

Sen. Nelsen (D-NE): And you agree with none of Donald Rumsfeld's policies?

Mr. Gates: None, Senator.

Sen. Roberts (R-KS): Let's just get this straight. You have no connection at all with Donald Rumsfeld?

Mr. Gates: None, Senator.

Sen. Kennedy (D-MA): And you have never been in the same room with Donald Rumsfeld?

Mr. Gates: (Pause) Well, Senator, I have, but ...

Sen. Clinton: And we should believe that this doesn't affect your credibility because ...

Mr. Gates: Well, Senator, as you can see here, I have this picture, Exhibit A, showing you, Presidents Bush, Clinton, and Bush, Senator Warner, Senator Kennedy, and several other member of this Committee, all together with Donald Rumsfeld at the last Inauguration.

Sen. Clinton: (Brief pause) I'm good.

Sen. Warner: All in favor?

All: AYE!!!

Sen. Warner: Motion carried. We're adjourned.