Sunday, August 27, 2006

More On World Domination

I found this hiding in Blogger's Draft folder. It's from back in 2006, but still fairly relevant, though the specific brouhaha it addresses has long gone.

A few more thoughts on Linux Domination:

It's not just an anti-Microsoft thing. Back in the day, I used Windows NT 3.2, including running overnight programs on my desktop. But then I discovered that Linux could do that kind of thing better (think backgrounding, not a feature of early Windows).

Then I discovered that I could make Linux my own. I'm fairly sure that my desktop is unlike any other desktop in the world. I know where everything is and what it's supposed to do, because I put it there. You can't get that from Windows. OK, you can get addons and patches that will more or less make your system behave, but every time you install a new program you get all sorts of things riding along. Me, if I install a new package, I just use "dpkg -L" to figure out what's in it, and if I find anything useful I put it into the .fvwmrc menu file, making it a part of my desktop. If something offends me, I can pluck it out immediately.

Then there are the practical reasons I mentioned in the last post. It's a lot easier to fix a friend's Linux machine than his Windows machine, no matter what the distribution. If my brother eventually decides to ditch his Win98 OS and run some obscure Linux distribution, well, I can help him with it. If my POSSLQ-in-law decides she's had it with viruses but wants a Windows-like environment, well, I can help with Gnome or KDE.

So I'd like Linux to achieve something close to World Domination.

But what's the cost? Eric Raymond wants us to embrace paid-for commercial drivers, at least in the short term. The perils of this from a practical point of view are obvious — in particular, if the company goes out of business, then you're screwed when someone finds a major security hole in the driver's code. Maybe that's the price we have to pay for total world domination. Certainly I've started down that road. I watch YouTube, which uses Flash (7, fortunately), I use RealPlayer for the codecs instead of HelixPlayer, and I rip my CDs to MP3s, 'cause that's what my car's sound system wants to hear. I haven't picketed Ford to tell them to convert to .ogg format. I've got Ubuntu's Multiverse repository ready to feed me any software I want.

But no matter how far down that (slippery, slopey) road some Linux distributions go, Linux won't go that far, because Linux and the GNU utilities that accompany it are released under the GPL. There will always be a totally free OS available, and, as we've seen over the last 15 years, someone to work on it.

So I'm not going to worry much about whether or not ESR is "selling out". Even if he is, he hasn't sold Linux down that road, because he can't.

Saturday, August 26, 2006

Why I Want Linux To Achieve World Domination

Over on Penguin Pete's blog we're having a discussion about a recent Eric S. Raymond interview, where he says that, in order to achieve a significant market share, Linux needs to get into the business of using not only Unfree, but Commercial (meaning $$$) drivers. Though he doesn't say it, this would circumvent the upcoming DRM crisis, where you'll be required to ask permission, very nicely, to play home videos you made of you and the missus on your own TV. ESR's idea is that, since the iPod generation (warning: an old fart is writing this post) is perfectly willing to accept all sorts of restrictions in order to play the latest, over loud, unmusical, misogynistic and racist drivel (told ya) into their pearly white earbuds, the only way to get Linux to the next level is to go over to the Dark Side and embrace commercial drivers for our hardware, just like Apple and Microsoft. (Though getting some things to work under Windows isn't all that easy. Then, this argument goes (I think): once Linux achieves a significant (20%? 30%?) share of the market, the hardware manufacturers will realize that Open Source is Great, open the code to all their software, and everyone will live in peace and harmony forevermore, we can all watch Grey's Anatomy DVDs legally, and everyone gets to keep their guns.

Some see this as a sellout of the principles of the Free Software movement. I see it as an attempt at pragmatism. A naive attempt, of course. For what the hardware manufacturers will see is that hey, Geeks are paying money for our drivers and jack up the price.

And, of course, the whole point of ESR's argument is that Linux should achieve, if not Total World Domination, or, at the very least a Significant Market Share. But why the heck should I care? I mean, I don't give a flying freckled frak what OS you use, do I? Just so long as I can use my software of choice.

Then, every once in a while, it hits me. Linux must achieve Total World Domination. Why, you ask?

Because I'm one of those who cleans up the mess left over by a certain other OS. And I'd rather not have that job.

Every once in a while I forget this, but events soon remind me.

Like this week. Follow:

* * * * * * * * * * *

I. As I mentioned earlier, we recently drove Child1 down to a rather large campus where everyone wears Orange and Blue (eehw!). Coming back up to civilization we stopped at Brother-In-Law's house, where my POSSLQ-in-law told me the "humorous" story of how they had clicked on some link on the web and all of a sudden the computer had filled up with all sorts of p0rn popups. Aaargh! I should have run to that computer, wiped it clean, reinstalled Windows, installed Firefox, Thunderbird, the Google Pack, a good virus checker and firewall, and informed B-and-POSSLQ-in-law that they weren't coming near this computer until they learned some common sense.

In the interest of family harmony, as well as wanting to get home before Christmas, I refrained. I know I will regret this, as they have several of my email addresses. So virii will soon be going out over email with my name attached, and will be cheerfully opened, since "well, HE wouldn't be sending us an email with a virus, would he?" (If B&POSSLQ-IL ever read this, I'm dead. I know it, it was worth it.)

II. On weekends, I tend to get up earlier than everyone else. Fair enough. During the school year they get up at 5:30. Getting up early means I have a chance to to some caretaking on the Windows machine. (See, I don't discriminate: besides, if you don't have a machine that works with Flash 8, how can you see all the Sci-Fi channel promos?) The routine is: 1) Run Virus Scan; 2) Run Spyware Scan; 3) Check for and Install Updates; 4) Reboot and watch Flash 8 animations until someone else gets up.

Now since we have large disks with lots of files, 1) and 2) take a lot of time. So last night I had a brilliant idea: after everyone went to bed, I got up and started the virus scan.

Bad idea. Why? Because, for reasons that escape me, but I'm sure seemed like a good idea at the time, Windows is set to auto-update at 3 am, which turned out to be right in the middle of the virus scan. I forgot this because ordinarily the machine isn't on at 3 am, forcing me to update by hand.

So Windows was updating itself at the same time that the virus checker was scanning everything.

Nothing bad happened until I rebooted. Then I found that the wireless connection had gone south. I noticed this because I kept getting error messages saying that some Symantec software had terminated in a strange way, beyond the comprehension of my machine.

Plus, I couldn't access the Internet. And when I clicked on the little monitor screen in the System Tray it told me that it was "Acquiring Network Address."

Now the wireless has been a bit flaky for a month or two, so I wasn't all that worried. Eventually it would connect.

Except that it never did. Even though the network looked fine on the Apple (wireless) and the Linux box (hardwired). After repeated reboots.

I began to curse and pound furniture. I probably awakened Spouse and Child2. That's OK, school starts on Tuesday and they need to start getting up earlier. The cursing didn't have any effect on the computer.

I was positive/sure/damn sure that this was a wireless problem. So I moved the box, keyboard, mouse and monitor down to the office, where I could stretch an Ethernet cable from the router to the box. Then everything would work, right?

Wrong. Same error. I made sure the wireless card was turned off and the Ethernet port on. I rebooted again and again. I searched the Internet, and found that this was a common problem, but none of the fixes I tried worked — I wasn't at the point where I would want to reinstall the network drivers.

I even broke down and called a neighbor who is more experienced with Windows than I. (No, I don't ask for directions, either.) He was stumped as well.

Finally, just before telling Spouse and Child2 that they were going to use Linux and like it, I remembered that there was a software update to be installed, and figured out that it must have installed last night. Maybe this was the cause of the problem?

Windows has a marvelous utility called "System Restore," which takes the OS back to a previous point, before you added some software which broke everything. (There may be some Linux systems that have such a thing, but I haven't needed it with Ubuntu so I haven't looked. With Fedora I certainly could have used it once or twice.) A breakpoint was set for 12:30 am this morning. I went back to that, rebooted, and voila, I had a wireless connection. Then, in a masochistic mode, I reinstalled the update, and, whatdoyaknow, the thing worked. Apparently the combination of installing the update and running the virus scan had messed with the registry or something. Anyway, it's fixed.

Oh, yeah, the update? It was the latest version of Windows Genuine Advantage, undoubtedly the most useless program in the history of civilization. (I bought a Dell with XP installed. If Dell is pirating XP, then Microsoft is dead. Microsoft is alive, so QED.)

This took about eight hours of my life, less meals, shower, and coffee breaks.

III. Just got off the phone with my brother. He's gotten himself a donated machine running Windows 98. The screen resolution is stuck on 640×480. I scream.

* * * * * * * * * * *

And so it goes. True, this was a rather unusual week, but these things happen every so often — remind me to tell you the story of how I had to install Linux on a computer before I could re-install Windows.

And I'm just a dabbler in the computer repair business. Imagine what the pros go through. (I don't have to imagine, I employ a pro at work.)

Linux (or BSD, or Solaris, or OS2, or even BeOS) World Domination can't come soon enough. Save me (and real pros) from having to fix Windows!

Windows delenda est

Not Your Average Museum

While taking Child1 to GatorLand, we found the Florida Museum of Natural History. By and large, it's just like every Natural History Museum you've ever seen: dioramas of the past life in the area, from dinosaurs to pre-Columbian, some fossils (impressively big ancient Great White jaws, you don't just want a bigger boat, you want a bigger museum), etc. However, they've also got the fantastic, amazing, stupendous, outstanding, fantastic — oops, I said that — Butterfly Rainforest, a screened area filled with, well, butterflys. Thousands and thousands. Oh heck, I'll just post a few pictures:

Some just show off:

Some like to feed:

But sometimes nectar just ain't enough — these are bananas, mostly:

A few other inhabitants are allowed — next time we'll get some pictures of the koi, as well:

Sometimes you just want to sun yourself on a rock:

The inhabitants are so friendly, they didn't want us to leave:

Anyway, go. I've heard they release butterflys on weekends at 2 p.m., so try to get there for that.

Wednesday, August 16, 2006

Login Screens for GDM

Not long ago, I learned how to change the Gnome Display Manager (GDM) login theme. You know, the picture that comes up when you boot the computer, asking for your username and password.

At the time, I didn't know anything about creating a login screen. It looks like it ought to be simple. Find a picture, blow it up to the appropriate size, add some text.

One of the login themes I had downloaded was the USS Enterprise from Star Trek. Well, it's the NCC-1701A rather than the good-old NCC-1701, but it will do. You download this as a tarfile, gdm-ncc1701a-default.tar.gz, and load it with sudo /usr/sbin/gdmsetup .

OK, so what's in the tarfile? Let's take a look:

$ tar tvzf gdm-ncc1701a-default.tar.gz 
drwxr-xr-x u       0 2003-06-03 11:36:14 enterprise-1701-A/
-rwxr-xr-x u  582242 2003-06-03 07:18:28 enterprise-1701-A/splash.jpg
-rw-r--r-- u   46781 2003-06-03 11:21:01 enterprise-1701-A/screen.png
-rw-r--r-- u     164 2003-06-03 11:09:07 enterprise-1701-A/GdmGreeterTheme.desktop
-rw-r--r-- u    7715 2003-06-03 11:33:03 enterprise-1701-A/icon.png
-rw-r--r-- u   21082 2003-06-03 11:36:14 enterprise-1701-A/1701a.xml

The tarball has a directory enterprise-1701-A, inside of which are several files. I'm not going to go into detail about the files, you can read all about it elsewhere. Basically, we've got:

  • GdmGreeterTheme.desktop, which holds the name of the theme, the creator, the copyright (if any), and a pointer to
  • 1701a.xml, the heart of the theme. We'll look at this more in a minute.
  • splash.jpg, the actual picture for the background of the login screen. If you can download the picture at 1280x1024 resolution, do so. The greeter program will shrink everything for smaller screens.
  • screen.png, which serves as an icon used gdmsetup to give you a basic idea of what the theme looks like. I typically use a reduced (200x160) version of splash.jpg, but that's your call.
  • icon.png This is the icon which is used to mark your various login options. In Ubuntu these are typically Option, which selects the language, Session, which determines the window manager, and System which allows you to hibernate/reboot/restart. You can use different icons for these functions, in which case you have multiple icon files, all with (of course) different names.

Now for the fun part. In GdmGreeterTheme.desktop there will be a line

Greeter=xxxxx.xml

Where xxxxx.xml is the file that controls the look and feel of the login screen. There are many options to this, but for our purposes we'll just modify the one from the Enterprise theme.

  • For my purposes, I wanted white text, so I looked through the file and changed all the lines that said normal color=#0000ff (blue) to normal color=#ffffff (white).
  • I also wanted a slightly bigger font, so I changed the font="Sans 14" to font="Sans 16".
  • The message text can be changed. Look for a box that says <text>Welcome to %h</text>. Change this to the message you desire. Note that %h is the name of the machine. You should translate the message into all the languages listed, but I haven't tried that. (How you you say "Resistance is Futile" in Polish?)
  • There is also a line which says "pos anchor ...", which gives the location of the box with the login message. The x and y coordinates are given as percentages. You'll have to play with these until you get something you can live with.
  • You can play the same sort of game with the icons, including changing their spacing and orientation (from a horizontal array to vertical).
  • When you've done all that, you naturally want to see what the thing looks like. You could select it with gdmsetup then log off, but that's time wasting. Instead, there is a command, gdmthemetester, which handles all of that. To look at the theme in the e.g. newscreen directory, go one step above that directory and type
    $gdmthemetester console newscreen
    and you'll see a representation of the the screen, in a somewhat reduced form. If you like, you can capture this picture to form the screen.png file mentioned above.
  • Put all of these files into one directory, then form a gzipped tarball of the entire directory:
    $ tar cvf newsceen.tar.gz newscreen
    if your directory is named newscreen. gdmsetup can then be used to install this theme.

I put the login screens I've "created" online. Let me know what you think of them.

Oh, heck, samples are probably in order:

Tuesday, August 15, 2006

Adding A Printer

I don't usually have a printer installed on this machine, because I don't need it all that much, and it's fairly easy to get to the upstairs printer using a USB drive and SneakerNet. This week, though, Child#1 is going to GatorLand, and we bought a printer to go along. An Epson C88+, to be exact ($79.98 at Staples). The usual: USB 2.0, Prints photos, etc. I mentioned that I might want one for the Linux box and the salesman freaked out. He started muttering something about having a printer specially built, but I stopped him by saying that this printer was for a Windows laptop. He calmed down a bit.

So we took it home and installed it on the laptop, using the driver on the CD included in the package. It worked, of course. So naturally I had to try it on the Linux machine, before taking the thing down to Far North Orlando.

Hook it up, boot up. Now what? /var/log/messages shows that a printer was detected. I know that CUPS (Common Unix Printer System) is the method Linux uses to find printers, but what command do I use? If I running GNOME I'd use System=>Administration=>Printing or something like that, but that only points to a "real" command. Under FVWM there isn't a menu item like that, so we need to know the command.

It turns out to be gnome-cups-manager, which brings up a menu that includes the item New Printer. Clicking on that found the Epson, and hitting Add Printer found the proper driver — unlike Windows, I didn't have to install the driver from a disk. There is also an option to make this printer the default.

And you know what? It worked right away. Now lpr prints to the Epson, lpq shows the print status, and lpstat tells me what's connected. Just like a real Linux system. For under $80, I might well go out and get one of these for myself.

Friday, August 11, 2006

Speeding Up Ubuntu's Boot

It's always irritated me that when Ubuntu boots up it displays messages such as

  • Starting PCMCIA FAIL
  • Starting BlueTooth
  • Searching for RAID devices

with comparable messages when the machine shuts down.

This is a desktop machine. It doesn't have a PCMCIA slot. Neither does it have BlueTooth.

I spent, maybe, $700 total on this machine over the last three years. Today I could get a faster box with more memory and the same capabilities for maybe $500. Why in Frak's sake would I put a RAID on this thing?

I went to /etc/init.d and was just about ready to start deleting files — in particular pcmcia. Fortunately, I decided to do a bit of a search, first, and found HowTo: Speed up ubuntu boot process. This is an extremely useful document. It tells you how to get and run sysv-rc-conf, a text-based program that edits your startup and shutdown configuration so that unnecessary programs are disabled. (There was a graphical version of this in Fedora, IIRC. Outstanding.)

On my box, once I installed sysv-rc-conf, I ran it using

sudo /usr/sbin/sysv-rc-conf

since I don't have /usr/sbin in my path. Then I read the article, and decided to shut down:

  • bluez-util, since I don't have Bluetooth;
  • laptop-mode, since this ain't;
  • mdadm and mdadm-raid, RAID control programs;
  • pcmcia and pcmciautil, as there is no PCMCIA card on this machine; and
  • ppp and ppp-dns, since I don't do dial-up.

I also visited the section of the article about editing file names in /etc/rc0.d and /etc/rc6.d, moving the files associated with mdadm, ppp, and PCMCIA from "K"name to "k"name, removing them from the boot and shutdown process.

I'm pretty sure that bootup is a bit faster, but I didn't do any timings. At least it gets rid of the annoying messages.