.comment: A Winding Path to KDE3

By: Dennis E. Powell
Wednesday, February 6, 2002 12:27:47 PM EST
URL: http://www.linuxplanet.com/linuxplanet/reviews/4046/1/

Desktop Delights

It began with eyecandy.

I like eyecandy. In that category, there is nothing better in Linux than Jamie Zawinski's XScreenSaver, and there has never been a better version of XScreenSaver than the newish 4.0. Within 4.0, there are no screensaver modules more visually pleasing than the GLX ones -- the 3-D, OpenGL modules -- as long as you have hardware support.

A week or so ago I sought to get and install XScreenSaver 4.0. Thus began a journey involving a great deal more.

Without hardware support, the GLX modules look like the slowed-down Zapruder film that is shown forever on one of the four cable television channels (they seem to trade formats, but can be described as "The Tornado Films With Bad Background Music Channel," "The Shark Channel," "The Really Disgusting Surgery Channel," and "The Goofy Kennedy Assassination Theory Channel"). With hardware support, they are smooth and quick and cool. Sad to say, but getting hardware support to work properly in Linux with XFree86 has never been all that easy. I spent days and days working on it a year or more ago. Since then, I've switched to a different distribution -- SuSE -- which does its best to deter users from setting up hardware support -- "direct rendering" -- at all. The reason I was given when I asked was that SuSE doesn't think it's sufficiently stable. They have a point, but properly managed, OpenGL stuff isn't likely to bring down the house or the machine.

My first attempt building XScreenSaver 4.0 ended when, at ./configure, I was told that the libraries necessary for the GLX modules were not installed. I went to the SuSE CD and installed them by trial and error until I got the results I wanted. XScreenSaver built, then, with no problem. It installed with no problem. It ran with only one problem -- the tick-tick-tick effect in the OpenGL modules.

In that my guess was that I was going to have to recompile XFree86 anyway, I thought that it might be a good time to upgrade from 4.1 to 4.2. And in that I'd read of some rare but troublesome bugs in 4.2 that had been fixed in the XFree86 CVS tree, I downloaded it from there.

Compiling XFree is always a little frightening, not because it is difficult but because it is different. Instead of the ./configure, make, make install routine with which most of us are familiar, one edits files, usually limited to /xc/config/cf/host.def and/or site.def in the same subdirectory, then does "make World >& world.log", then waits, then inspects world.log for evidence of disaster, then backs up the working XFree on the system, then does "make install >& install.log." Then restarts X to see how it all worked out.

My custom is to build XFree with no changes, to see what's broken and in need of fixing. In the past, there were always changes necessary to get GLX support and to get Freetype -- typeface anti-aliasing, another crucial eyecandy element -- working. Not this time, though. It was really startling. Everything worked. I hadn't needed to edit any files at all!

On a roll, and because sooner or later I was going to need to take another look at it, I downloaded the latest KDE3 source, which was now labeled Beta 2, and began the considerable process of compiling it. This begins with qt-copy from the CVS tree -- it really ought to be made available elsewhere -- which is the latest release Qt with hacks and patches. A tip that anyone undertaking a build of qt-copy is likely to find essential: first thing, do "export YACC='byacc -d'" because the GNU bison does not work.

The kdesupport package is supposedly deprecated and no longer necessary, but I've always found it a good idea to make and install it first anyway, which I did this time. Kdelibs built just fine, but kdebase blew up. I took a look in the kde-devel mailing list archives, found nothing obvious, posted a question to the list, didn't hear back quickly, and went back to the archives for a more thorough search. After awhile, and several tunings of my search terms, I found that the problem was due to my having less than the latest zlib aboard. So I got and built the latest zlib, and installed it, and ran /sbin/ldconfig -- and hit the same problem in the same place building kdebase.

"Locate zlib" gave me cause for a minor rant, in which I will now indulge: Look on your machine. You have zlib all over the place. Here, it was in the kernel source, it was in the Java Development Kit, it was spread out over /usr, and it was in /usr/X11R6. Four copies -- no, four different versions -- of the same library, each going its own way. There are probably very good reasons for this, but it's still ridiculous. And as Linux grows bigger and more complicated, it is going to create problems that grow at an exponential rate.

Seeking to solve the current problem, I did as advised in the archives and pulled the zlib stuff out of /usr/X11R6. Kdebase now built, as did the rest of the KDE3 source. (I have now been told that the version of zlib aboard is no longer critical to the successful compilation of KDE3.)

I was on deadline, so I did not go ahead and give KDE3 a spin -- in previous builds, KDE3 imported practically none of my existing configuration, and I didn't have time to reconfigure everything. I changed my /opt/kde and /usr/lib/qt symlinks back to my old, reliable /opt/kde221 and /usr/lib/qt-2.3.1 and restarted X.

And now hardware support in the OpenGL screensavers was broken. (To find out if you have hardware support, do "glxinfo" at a prompt, scroll to the top of the results, and see if you have "direct rendering: Yes".) So, as soon as I was off deadline, I took the very long way around -- I did "make clean" in my XFree86 source tree, went to /xc/lib/zlib and replaced everything there -- version 1.0.8, I think -- with the 1.1.3 I'd gotten to get kdebase to compile. Then I recompiled XFree and installed it. Now I had my direct rendering back.

(Pavel Troller reminded me a day or two later that all I needed to do was to put the line "#define HasZlib YES" in my /xc/config/cf/host.def file before building XFree to get X to use the zlib I had installed in /usr. Either way it meant an XFree recompile, though my delight in having needed to edit no configuration files had blinded me to this expedient.)

Imagine my chagrin when, during the following night, XScreenSaver apparently locked X, such that no input was accepted. I spent a good deal of time chasing my tail over this one: Was one particular screensaver module responsible? Was an overly enthusiastic cron job deleting something that ought not have been deleted? I wasted way too much time on this before it occurred to me that it might be a good idea to recompile XScreenSaver against X as currently installed. The problem -- fingers crossed here -- seems to have gone away.

(Jamie himself was of help in my search for an answer, though his first note was a couple of URLs "for how this is not my fault." He was right, of course, but it spawned a bit of a chill -- I remember a friend's old joke about how Microsoft technical support was "where you wait on hold for an hour to be told that you have an incompatible mouse pad." There was a lot of everybody blaming everybody else in the old days; I hope in the Linux sphere we remember that solving the problem is the actual object. And this is no comment on Jamie's response or his sterling work -- merely that it reminded me of those sad days.)

And with all that as prologue, I now changed my symlinks -- /opt/kde to /opt/kde3 and /usr/lib/qt to /usr/lib/qt-copy. Then I did "startx".

And I was amazed.

KDE3 Has Come A Long Way

It had been several weeks since last I compiled the KDE3 source, and at that time it was unpromising in a number of ways. Chief among them was that none of my configuration files, achieved through months of tuning here and there, little or none of it documented, survived the switch. So I'd build KDE3, poke around in it a little, be cranky over the fact that typeface handling -- spacing, anti-aliasing -- was broken, discover some other things I didn't like, and return to KDE-2.2.1.

This time was different.

Following the splash screen (whose animated icons are for some reason silhouettes on my machine), I was treated to a desktop that looked exactly like my KDE-2.2.1 desktop. Now, if my desktop were utterly stock KDE, this would be no great achievement. But for a desktop background I use XPlanet set up do do the phases of the moon in near-realtime, updating hourly. I keep no icons at all on the desktop, relying solely on Kicker, which I have set to autohide. (It had always annoyed me a little that Kicker left a couple-pixel-wide line at the bottom of the screen when autohidden, but in KDE3 this is no longer the case -- when it autohides, it hides completely.) When I looked at Kicker, there were no broken-link icons, though there were a couple of new docked applets. One was the KDE laptop daemon, which is superfluous on a desktop machine. The other was a little U.S. flag with "U.S." superimposed over it. I killed both of these, because I don't change charsets and, again, this was not a laptop machine. I also killed, with the usual difficulty, the KOrganizer alarm daemon. I would be far more inclined to use KOrganizer if it didn't make it so troublesome to shut it down entirely when one is done with it. Others, I suppose, don't mind this; I try to avoid having running on my machine anything that I don't use, and I don't use the KOrganizer alarms.

I then started looking at things that I remembered as having been broken earlier. The first was to click the Opera link on Kicker. I use the dynamically compiled Opera, and I had changed versions of Qt, so I knew that this would not work. Only thing is, it did work. Well, mostly -- typeface anti-aliasing was gone, and once you've come to know and love anti-aliasing, its absence feels like burlap underwear. But the fact that it ran at all was a marvel.

The conventional estimation of KDE3 is that it is nothing more than KDE-2.2.x ported to Qt-3.x, and to some extent this is true. But the developers have taken advantage (and in some cases written around) improvements (and changes that could not be described as unqualified improvements) in the new Qt.

Konqueror continues to grow by leaps and bounds, and for eyecandy addicts there are a couple of things that get noticed at once. The alpha blending of hidden files and directories is the default, and it's pretty. And now there are animated folder icons. OS/2 survivors will remember these, though in that operating system the opened-folder icon appeared only when the directory was actually opened. In Konqueror, when the mouse is over the icon, the open-folder icon appears. This makes as much sense as anything else, in that if the directory were actually opened you'd be looking at its contents. If, however, you have Konqueror set to open a separate window for each directory you open, it makes more sense -- the open-file icon remains open until you close the window containing the directory's contents. Not necessary, certainly, but cute, and conceivably useful, and in any case something that imparts a sense of polish.

Some dialogs have changed in the jump to KDE3; one example is the completely different file dialog, which now lists general locations down the left, and which no longer has both horizontal and vertical scrollbars, the horizontal one having been eliminated. I think I like it better, but overcoming inertia always takes awhile.

Icon support seems far more complete than it has been in earlier versions of KDE, with icons of all sizes and in a multitude of color depths having been provided, and mimetype identification seemingly far better. (If you get the impression that I'm hedging a lot of things here, it's because I am -- I haven't totally wrung out the new version, which would take a lot longer than I've had. I'm giving impressions and discoveries based on a few days' use in the normal course of work.) Additionally, there have been a lot of improvements in the appearance of a number of applications. For example, the message list in KMail now alternates shading from message to message, ledger style, making it easier to keep track of the subject, author, and date as the eye crosses the screen. KNode, the wonderful and under-appreciated KDE newsreader, now has a far more polished rendering of headers. Nice.

New in KDE3 is the requirement, at least in some installations, to configure Qt itself. This is needed, for instance, if you want to use typeface anti-aliasing There is, fortunately, a nice little app -- qtconfig -- that makes this easy; it produces a ~/.qt directory containing a file named qtrc. Oddly, qtconfig appears nowhere in the K Menu structure, so you need to fire it up from a terminal emulator window such as Konsole or from the KDE Command Line applet (alt-f2). I think it would be good -- and save a frequently asked question or two -- if it were added to the KDE Control Center and therefore the K Menu; though Qt is not part of KDE, you'll not see KDE without Qt.

Though I've heard reports from others that aren't as rosy, KDE has always been remarkably stable on any machine on which I've run it, and the KDE3 beta2 is no different. My experience is that it is now more than ready for users to build and take through its paces. Unfortunately, to do so using the latest code requires use of CVS or CVSUP, in that there are no beta2 binaries on the KDE ftp site, though I expect that this will change when there is a full-fledged release candidate.

Bear in mind, though, that KDE3 beta2 is not a release version. There are still some annoyances.

Things I Hope Are Changed Before Release

Of KDE's many applications, the one I use most is KMail, and KMail in the KDE3 beta is usable but irritating as all hell. Where to begin?

The one configuration file that is likely to be sufficiently complicated that losing it could be a real headache is KMail's. Would you care to guess which configuration file does not wholly make the jump? Good guess.

If you use KMail's own addressbook, you're screwed, because it is gone. The new default is one of those goofy things that wants you to enter everything up to but not quite yet including the blood type of the person whose email address you're trying to save. I can see how this might be useful to those who want to pretend to remember all sorts of things about a business contact, and there are some fields that might be more generally useful, but there are some of us -- well, at least one of us -- who would just as soon have our email addressbook comprise email addresses, period. If this were not bad enough -- which it is -- there is no facility that I can find for importing an existing KMail addressbook to the new default addressbook, though there is supposedly a way to import Outlook addressbooks. Bah!

A comparatively minor irritation is that it used to be that KMail would, when you sought to write a message, give you a blank line on which to do it. No more. It now starts you out on the line containing the double-dash signature delimiter.

Really weird is the behavior of the embedded textfile viewer in Konqueror. There is an intervening dialog that inquires as to the document's encoding. I imagine that there is someplace where this can be turned off -- I haven't searched for it yet, though, but will when it reaches a certain threshold of irritation. Weirder still is the way that it displays simple textfiles -- it seems, for instance, to ignore carriage returns, at least some of the time.

There is actually a more general charset problem -- I guess it's a problem -- with KDE3. It is nice, I suppose, to see Chinese spam now rendered in the proper characters in KMail, as it now is. It is not nice, when I dump out of KDE3 to a console, to find that the charset has gotten changed to something corrupt that resembles a combination of high ascii and ansi figures; the "reset" command fixes it, but I doubt that this is the behavior anyone had in mind.

Klipper, the KDE clipboard manager, is now broken in multifarious ways, or seems to be. Perhaps the addition of yet another level of complication is what somebody hoped for. Here's how it used to work: When you highlighted something, it was copied to the clipboard. When you did Edit > Paste, or hit the center mouse button (or its both-button emulation in two-button mice), it pasted the last thing copied. If you wished to paste something else, you would click on the Klipper applet in Kicker, select the item you wanted from the list, and it would now become the active item for pasting. Here's how it works now: Highlight something, and a weird little menu with "Edit contents" and "Cancel" appears. You need to click just to make the thing go away. Now. The text you highlighted does appear in Klipper, but this by no means assures that pasting will give you what you just selected. It might give you something else from the list in Klipper. It might give you nothing at all. You can go to the Klipper applet in Kicker, choose that which you just added to the clipboard, and now paste it. If there is an improvement here, I certainly can't find it.

While KOffice has been formally uncoupled from KDE development such that no specific version of KOffice corresponds to a specific version of KDE, the two remain tied for all intents and purposes -- they're tied to the same Qt. I do not use all of KOffice, but I use KWord a great deal, so it was with some excitement that I opened the new version, which is said to be much improved. And it is true that, for instance, there are many new export filters -- still nothing for .doc files, but there is RTF, which in some cases will kludge through for those who must exchange documents with Word users. (The HTML filter, though, once good for writers who wished to strip much of the encoding from their work and merely use it as a good document transfer format, has become bloated beyond all recognition and next to useless.) Much work has been done to make KWord truly WYSIWYG, but because I have never printed from KWord, I have no idea how successful this is. What I did discover, though, is that the terrible spectre of autocorrection has been visited upon KWord. I encountered it while writing this very column: When I wrote /opt/kde, it turned into /opt/KDE; when I wrote /usr/lib/qt, KWord thought I meant /usr/lib/Qt, which I didn't. I spent awhile looking and found that the only way to be rid of this pestilence was to remove those items from the list of autocorrection candidates. At the same time I dropped a note to the KOffice mailing list, asking where to turn off autocorrection. Laurent Montel wrote back quickly with the news that there will be a checkbox to do just that, probably by the time you read this. (I've also encountered an annoying little phenomenon in which the character next to the cursor is slightly corrupted through the few pixels closest to the cursor being raised a couple pixels; if I go around the page clicking on characters, the corruption remains even after I've moved on. But it's entirely possible that this is a phenomenon unique to my setup here, possibly because I use a slightly nonstandard -- 1280x960 -- resolution.)

Again, this is a beta release, and anyone expecting everything to work properly is setting their expectations a notch too high. There are a couple of design decisions -- the KMail addressbook, Klipper -- that I think are atrocious and that I imagine others will find bothersome as well. But all in all, KDE3 in its beta2 incarnation, is far, far better than I expected it to be, even a few weeks ago.

Though there is one thing more: Word was, a few weeks back, that Mosfet had rejoined KDE development, which is delightful news. Also, and in that this saga all began with my relentless pursuit of eyecandy, I should note that his "liquid" style is something without which life loses all meaning -- it's that cool. But it's not part of KDE3, at least not yet; his web page says he's ported it over, but I couldn't find it there, either, and the existing source for it won't build against KDE3/Qt-3. I downloaded kdenonbeta (a package well worth the trouble for those who feel adventurous -- it contains projects in the works and projects that have been at least temporarily dropped; there's usually something useful or at least interesting there), but no "liquid." I do not know where it is, and no one will tell me.

I want it. Now.

Copyright Jupitermedia Corp. All Rights Reserved.