|
Leading and Bleeding with XFree86 4.0 and KDE 2 Beta
An Installation OverviewIt all started with an annoying bug in KMail, and it has ended with my primary Linux machine running a new version of glibc, the latest XFree86, and the brand-new beta of KDE. In this article, written just a few hours after all this came to be, I'll walk you through the installation process and give a brief first look at the new KDE. (You can take a quick peak at KDE 2 in the accompanying figure; other screen shots can be found later in the article. Fair warning: This is an installation overview and a first impression of the new KDE, not a tutorial. If you know more than me you don't need my help, and if you know less than me you have no business trying this at home. If you're a newbie, just skip to the KDE "first look" section and enjoy knowing that this will soon be coming to a desktop near you (the KDE team is saying late summer). Or, if you really want to try this, ask a more experienced friend or users' group to help you out. If you're a veteran Linux guru, this article will give you a synopsis of the steps I followed (hopefully helping you to avoid some of the empirical parts). Veteran or newbie alike, if you decide to try anything described here--make a system backup of the old version first! Now, shall we begin at the beginning? In other words, why am I doing this to a perfectly good Linux machine? I had KDE 1.1.2 installed, running, and very stable on my Caldera OpenLinux 2.3 machine. KDE was working great, and I was happy with it. I looked at GNOME, liked it as well, but didn't have any real reason to switch. The only thing I hated about KDE was that KMail wouldn't send messages. I had tinkered with the account-setup options, tried several different SMTP servers both on my local host and on my ISP's network, and compared the settings against other mailers on my machine. I could even send mail by telnetting to port 25 on the SMTP relay and typing the headers by hand. But when I clicked the "Send" button in KMail, nothing happened. No message sent, no message queued, and no error message in any log I could find. I pored over documentation and help files, posted to the Caldera users' e-mail list, and pestered my colleagues. No help in the docs, and no one had ever seen my problem before, nor could tell me what to do about it. Worse yet, I had personally set up KDE on Linux systems I built for two or three friends, and not one of them had any problems at all! There are other e-mail programs, including excellent console-based apps, but I want to be able to run what my non-techie friends are running so that I can better support them. Even if KMail ends up not being my own choice for e-mail, I need it running on my workstation. I knew there had to be a way to make this work, and I was determined to find it! In desperation, I decided to follow a really wild piece of advice from Dennis Powell, KDE wizard and writer of the excellent book, Practical KDE. Dennis, or "Dep" as he's called online, suggested that I try the alpha code of KDE2. I did a double-take at this, because e-mail is mission-critical to me and I couldn't imagine running my whole desktop on beta code, let alone on something that's called alpha. Dep was kind enough to send me an early draft of a HOWTO-like document he's writing, which explains very lucidly how to install the snapshot builds of KDE2 and how to safely make it coexist with KDE 1.x. You can't run both at once, but you can switch back and forth as needed. I read his article carefully (by the way, it's not ready for publication yet, so I can't tell you where to get a copy--but there's a similar document linked from the Documentation section of the new www.kde.com Web site) and decided that this was something I could do. Mind you, I don't lightly approach trying a source build of extremely large and complex C/C++ projects. I'm a Java and shell-script guy. I know C, but not well enough to debug anything down in the bowels of KDE. But I have enough confidence in my Linux skills to be able to safely back out anything that failed, so I figured I'd give it a try. Then I got carried away with things. I had previously installed (successfully) the new XFree86 4.0 on my Dell laptop, and it was working great. The source refused to build under Caldera 2.3, but the binaries went right in. It even correctly detected the weird flavor of ATI Rage Pro that lives in the Inspiron 7000. If it could do that, I figured, installing it on my desktop machine with an ATI Xpert98 would be a breeze. Besides, I reasoned that if I already had the machine down to console mode for the KDE build, I might as well plop XF86 4.0 on there too. Everybody said that KDE2 was faster than KDE1, and like any other good Penguin I have an infinite craving for faster systems. Then the folks at KDE announced the first beta for May 11. That did it! I was hooked! I held my breath (see how blue I am?) until The Day arrived, then grabbed the code as fast as my cable modem could snarf the files. I was off to the races! Well, I was at the starting gate, anyway.
Step 1: Upgrading glibcDep and another colleague had suggested I take a look at my glibc version before installing XF86 4.0 or KDE2, and they recommended 2.1.3. I was at 2.1.1, so the first thing I did was to upgrade. Given how central glibc is to the entire system, I was expecting this to be a nightmare. It actually turned out to be the easiest part of the whole process. I just grabbed the source tarball for glibc 2.1.3 itself, plus the appropriate versions of glibc crypt and linuxthreads. Crypt and linuxthreads get unpacked inside the source directory. Then I ran:
from that same directory. Everything worked fine. (Note that if your previous version of glibc came from an RPM, your RPM database is now out of sync. I made a conscious choice on my machine that I didn't care, but you may want to take a more deliberate installation path and use the rpm command to uninstall the old version after making a careful backup.) You may not even need to do this step; I upgraded because I trusted the people who recommended it, not for a specific technical reason.
Step 2: Installing XFree86 4.0XFree86 4.0, available from http://www.xfree86.org/, is "released" but the development team's web site says that 3.3.6 is still the more stable version and recommended for most users. There are substantial performance improvements in 4.0 and a new format for the critical XF86Config file. I had seen such a substantial boost in speed on the Dell laptop that I was drooling to get XFree86 4.0 on my desktop as well (especially since I no longer have that laptop). I have tried unsuccessfully to build XFree86 4.0 from source on three Caldera OpenLinux systems. The make step always hangs while building xterm, and I'm not enough of a C++ wizard to know why. Dep says that if you kill (from another console) the particular step that's hanging (not make itself), the process actually continues and apparently suffers no ill effects (it's already done building xterm at the point of failure, but it hasn't figured that out yet). I had reached my frustration limit by the time I got that tip, so I never got around to trying it. Instead, I simply installed from the binaries that I had already downloaded. Having Caldera OpenLinux 2.3 and glibc 2.1.3, the binaries I used were those for glibc 2.1. Specifically, I downloaded them from ftp://ftp.xfree86.org/pub/XFree86/4.0/binaries/Linux-ix86-glibc21/. The mirror sites weren't yet updated when I went looking for this version, but they may be by now, so you might want to check your nearest mirror first. If you're running XFree86 3.x.x now, take the time to make a backup of
XFree86 4.0 comes with a handy installer called Xinstall.sh, and the
developers strongly recommend the use of this utility. The only areas where I
diverged from the instructions were that I didn't install over my previous
version (and therefore had to manually copy some binaries back into the
Unfortunately, installed is not the same as working. The next step after
running Xinstall.sh is to run The backup plan was to fall back to the old standby, SuperProbe and
xf86config. SuperProbe (that's the actual name of the binary, including the
upper case) is a handy utility that can tell you more than you ever wanted to
know about your video card. Between that and the manual for my Sony monitor, I
gathered all the hardware data and ran xf86config to build the configuration
file, Alas, though xf86config ran perfectly and even had my card on the list, it ended by telling me that my adapter was unsupported and would only run as generic VGA. That being, er, less than optimum for a Web development workstation, I did some empirical hacking around at the XF86Config file, and eventually ended up with one that worked. The relevant sections of the file for the ATI Xpert98 look like this:
Of course, your system's configuration will be different unless you have the same hardware as me. By now it was 11:30 p.m., and I had a working X11 server. The only remaining
step was to copy the old version of I was up and running, still in the old KDE but now with the new XFree86 4.0!
The only problem I've found so far is that WordPerfect 8 is broken on my
system, claiming that it can't load the Depending on your distribution, you may need to change the file that starts
your KDE or other X11 desktop. On Caldera 2.3, the affected file is
was changed to:
This is required so that init processing will be able to start X11.
Step 3: Installing KDE 2 BetaHaving fought all the alligators, I at last was able to refocus on my original goal of draining the swamp. Specifically, this was all aimed at getting KDE 2.0 running. Okay, I got a little carried away in the preliminaries, but I had fun doing it, and I learned a lot about configuring XFree86. It was worth the time. Building the new KDE wasn't especially hard, but it has a lot of steps. The first thing I had to do was to get the KDE snapshots, which came from ftp://ftp.kde.org/kde/snapshots/current/. As with XFree86, I did this before the mirrors had replicated the code, but you could improve your download speed and reduce the load on the KDE team's server by checking the mirrors first. I have also learned, after doing all of this manually, that someone has just released a set of RPMs for Caldera eDesktop 2.4. These can be found at ftp://ftp.kde.org/pub/kde/unstable/distribution/. I have not tried the RPMs (for one thing, I don't have eDesktop 2.4 yet) but they are another option if appropriate to your system. You'll need to install the new QT 2.1 libraries from Trolltech first. Since
I'm not using QT to develop commercial software, I downloaded the free version
(licensed under the QPL) from Trolltech's Web site and installed it according
to their directions (after first backing up what I had, which was 1.44). This
is the step where you break compatibility with KDE 1.x, so be very careful to
make a backup of QT! I untarred the new QT source under Next, you're ready to build KDE 2 itself. I picked KDE's source snapshots come with a file called compile_script, which you would think does a correct and complete build. It doesn't, or at least it never has for me. Fortunately, you can edit the script to make it work correctly. Unfortunately, it's not just a single change--you actually have to modify it several times during the process. Start by adding "kde-qt-addon " (note trailing blank space!) at
the beginning of the list of strings on the PACKAGES=.... line. You're now
ready to run the script. Each time you run the script, you need to have your
KDE 2 destination directory (not the file download directory) as the current
working directory for your shell. If you don't do this, you will end up with an
enormous mess! Run the script and pass its own directory to it as a parameter
so it knows where to find the source code. For example, if you downloaded the
.bz2 files to
(Note the spaces after "sh" and after "compile_script".) It will crunch along for anywhere from several minutes to an hour or more,
depending on the speed and loading of your machine. Then, if you are as
fortunate as me, it will die. When it does, look in your
This should succeed. What you've just done is to resume the original make at the point where it failed. Note that I'm assuming here that you suffer from the same errors I did--there just seems to be something wrong (memory leak or stack overflow, perhaps?) in the GNU development tools, but make is very smart about resuming a failed build. If make install works successfully, then do a cd .. to get back to the main installation directory. This step is crucial! Now go back and edit the compile_script again, and delete from the PACKAGES=.... line all of the packages which have been successfully built so far, including the one where you just intervened manually. Repeat this process as many times as needed, until you have a full KDE 2 build. It took me about five hours to get through the whole thing, and I finished (finally!) at 4:30 a.m. The "kdemultimedia" package never would build for me, but it's nonessential so I finally just skipped it. There are also a couple of packages that aren't in the compile_script; I haven't gotten around to building these yet.
Step 4: Testing the InstallationThe first time I tried this (with one of the April snapshots) I made a royal mess of my KDE configurations by letting KDE2 share user directories with KDE1. Bad idea. Instead, add the line:
to your Login again, or manually enter the above command, so that this variable is
defined correctly for your current session. You'll also need to clone the
"kde" command from the old KDE 1 installation into KDE 2's
If you are running xfstt, the TrueType font server, and you upgraded to the
new XFree86, now is the time to kill xfstt and start xfs (the new version of
it) instead. Just type Now, from a console-mode user prompt, just run
My First Impressions of KDE 2I've only been running it for about eight hours as I write this, but so far there have been zero crashes of KDE as a whole. I've seen some applications refuse to start, or start then die with no message, but KDE itself seems relatively stable. There is no doubt, however, that this is beta level code and not a final release. Not all of the features that are shown on the menus are implemented yet, and some of what's there doesn't work right--or at all. Even the compile process, if you watched it carefully, issued warning messages about "really ugly hacks" and other TODO items that need to be fixed before the release date. Konqueror, the built-in browser that can do local files and directories as well as Web and FTP sites, has been much improved in this beta. I used it to visit some web sites with fairly complex layout and frames, and I haven't yet seen a problem. The alpha version that I tested previously crashed a lot; so far the beta has not crashed at all. Figure 1 shows Konqueror viewing a local directory and the LinuxPlanet home page; the Task Manager and a couple of menus are also shown. Note the attractive marble texturing, one of several themes that are part of the distribution. One problem that pervades my installation of KDE is that it is unable to view JPEG files. GIF and PNG work fine, but not JPEG. I don't blame the KDE team for this--I probably did something wrong during installation, or I need to update my libjpeg files. I'll work on this soon, because it's a real headache for Web access. KDE 2 adds numerous graphical tools and toys. I haven't had a chance to look them all over yet, but Figure 2 shows KFractal, KPaint, and Katalog. Katalog is a thumbnailing tool for organizing images, and I'm looking forward to seeing what it will do in its released version. It looks as if it might be pretty useful for organizing clip art or other Web graphics. I couldn't get the Icon Editor to load, unfortunately. The new system information tools, shown in Figure 3, provide detailed data on the processor, memory, X server, interrupts, I/O, and other details. I especially liked the memory graph. There is also an applet that runs in the KPanel and shows a live bargraph of memory and swap usage. The partition information wouldn't work for me; I don't think it's implemented yet, judging from the message that popped up. Figure 4 shows some of the configuration dialogs for the desktop, KPanel, and the screen savers. I don't have the OpenGL support loaded yet, so not all of the screen savers would work for me. (Of course, that's not a KDE bug, and I know what I need to do to fix the problem.) Kontrol, the KDE customizer, has many dialog panels available for controlling just about everything in the desktop environment. Not all of the features are implemented yet, but there are already a lot that are working. Figure 5 shows the font-selection dialog. Finally, here's my old friend, KMail, in Figure 6. showing its main screen and the "Identity" configuration dialog. Guess what? The SMTP send now works perfectly! So, though I had to fight a lot of alligators to get here, the swamp is at last drained and dry, so to speak. One feature I really like in the new KMail is the ability to define multiple identities within a single Linux user account. That's very handy for people who need different taglines and reply-to addresses for business and personal use, for example.
Next StepsI'll spend a few hours over the next week or so working on the problems I've already found, and reporting to the KDE team anything I can't fix. Then I have some definite plans on what I'd like to do in the new KDE 2. For starters, I want to learn more about the KDE object model that has been added into this version. I have heard rumblings of Java bindings being written, or at least possible, and I'm intrigued. As an avid Java programmer, I like the idea of being able to do both cross-platform and natively-targeted applications in Java. Microsoft did something like this with DirectX, and I never objected to it until they started cramming it down everyone's throat with Visual J++ 6.0. But I like having the option as a programmer to use native tools where they make sense, and cross platform tools where they make sense. KDE Java bindings, if they really are under development, would do for Linux Java what Microsoft DirectX did for Java on Windows--except that in KDE it'll be an Open Source toolset. Next, I need to get my sound and multimedia support working. I didn't have sound working on my prior version of KDE (I broke it during a kernel upgrade and hadn't gotten around to fixing the modules list yet), but I'd like to try the new audio server architecture under KDE2. Finally, I think I might even be adventurous enough to fool around with KDevelop. I haven't seen it in action yet, but everything I've heard about it suggests that this C/C++ IDE is very promising and maturing rapidly. I need to refresh my long-disused C++ skills, and this just might give me the impetus I need. I hope you've enjoyed this little romp on the wild side, living out on the bleeding edge with some pretty untested code and configurations. I won't claim to be an expert on what I've just done--but I certainly have learned a lot by doing it, and I intend to keep on learning as long as Linux and Linux software keep innovating. I suppose some people buy a computer to do useful work, or so I have been told. Not me--I'm having too much fun! If you have suggestions of better ways to do things than what I've described here, by all means let me know by e-mail. When I do any follow-up articles on this topic, I'll include some of the most helpful suggestions. If you send me an idea, please let me know if I may use it in print and if you would like your name mentioned in the credits. XFree86 4.0 and KDE2 can be a challenging installation, but over the past few days I've learned that they can be made to play together. I'm looking forward to what the future holds for both of these excellent Open Source projects, and I congratulate the teams on what has been accomplished so far.
|