About a year ago I switched to using Ubuntu Linux as my primary operating system. I like Ubuntu a lot, and I’ll probably write more about it later. There is, however, one oddity about Ubuntu, which I can’t explain. It seems to be incompatible with my cat Morgana.

The Linux-Destroying Cat

Morgana sleeping on top of the computer desk. She only looks innocent.

The first incident came within a couple weeks after we adopted Morgana (and her brother, Merlin).  Morgana pranced across my keyboard as kittens are wont to do, and somehow hit a keystroke combination that changed the input language to Tamil.  So I would type a Roman letter on the keyboard and a Tamil character would appear on the screen.  It turns out this was quite a pain in the neck to fix because I had to search the Web to find how to reset the language, yet I couldn’t type readable English into the search engine.

Well, Morgana has done it again.  Last night she scampered across my keyboard, and immediately my monitor looked like this:

Morgana shifted my root window nine inches to the left. How!?

Notice how half the monitor is blank, and only half of the desktop is visible — and, I would point out, the wrong half! The half with the menu on it that opens up settings I could change to fix this problem? That’s the half that’s off the edge of the screen. Moving the mouse did not cause the screen to scroll to the left so I could get at those menus.

I am at a complete loss to explain how she did this. I’m using the KDE desktop (from the kubutu version of Ubuntu) with compiz as my window manager and the Emerald theme manager. There are a lot of keyboard controls for compiz but I would never have imagined one that does that.

Even worse — KDE was set up to preserve all changes to my desktop settings, so logging out and logging back in didn’t fix the problem. My desktop was permanently skewed 50% to the left, courtesy of Morgana.

The solution was simple, but only because the problem occurred on Linux. Almost all Linux applications are configured via text files. KDE is a Linux application and follows that convention. Therefore, I was able to log in via a failsafe terminal session (which doesn’t launch the KDE desktop) and edit the text files containing Morgana’s configuration change. If I were really a KDE whiz, no doubt I could have found and reversed the one change she made. As it was, I didn’t want to spend a lot of time or effort on this, so I simply backed up and then deleted the configuration files. Sure enough, when I started KDE again after that, the desktop session manager didn’t find any saved configurations, so it automatically created new ones and saved them for me.

Technically, I lost all my personalized settings such as my desktop wallpaper and menu customizations. But those settings are not really lost because they’re in the backups of those text-formatted configuration files that I made. If I wanted to spend the time and effort, I could use Linux text-searching tools like grep and diff to find what Morgana had changed in my old files, undo that, and then restore my old settings. I happen to think it will be quicker and easier to re-create my custom settings than to try to make sense out of those configuration files, but the point is that I have a choice.

The principle that Linux uses text files to configure applications may seem simple, perhaps even quaint to a modern user who’s familiar with configuration wizards and graphical control panels. When that principle is applied consistently throughout the thousands of configuration files on the computer, though, the benefits are huge. Configuration information is exposed to the user; it’s easy to search, easy to back up, and easy to change even if there’s something seriously wrong with the desktop display (for example). That’s one of the reasons I prefer Linux.