It seems the hardest part about building KDE (and other large programs) from source is solving the initial dependency problems. Once Qt and arts were installed I thought I was set. I wasn't quite golden yet, though. The kdelibs configurator complained that my version of libART LGPL was too old. I found the most recent version of libART LGPL by searching for "libart" at rpmfind.net, I downloaded and installed libart_lgpl-devel-2.3.10-1.i386.rpm for "Red Hat-8.0 for i386." The next thing the configurator complained about was my lack of "libxslt 1.0.7 or later." Again I turned to rpmfind.net and found the file libxslt-devel-1.0.19-1.i386.rpm for "Red Hat-8.0 for i386" by searching for "libxslt-devel." The last thing the configurator complained about was my lack of a CUPS installation. I opened up
"Packages" from the "System Settings" menu and proceeded to install CUPS by selecting it from the "Printing Support" section.

Figure 1: Dependency Hell
Setting up the environment
After compiling and installing kdebase, kdeadmin, kdeutils, and kdenetwork (in that order), I felt I had installed enough KDE packages to give her a brief test drive. I tried to install kdeartwork to see what extra graphical goodies were thrown in, but compilation failed for reasons unknown to me. I also tried to install kdegraphics and kdemultimedia, but they also failed during compilation (the error messages indicated programming errors). I suppose I should file a bug report, this being a release candidate. I had to do one more monotonous thing before being able to witness my labor of love. I had to tweak my environment (mostly path settings) so KDE could find everything it needed to get up and running.
The first thing I did was uninstall all the Red Hat KDE packages just to avoid any potential conflicts. The next thing I did was open up /etc/ld.so.conf and replace /usr/lib/qt3 with the path to my newly installed version of Qt. I installed Qt in /opt/qt, so I replaced /usr/lib/qt3 with: /opt/qt/lib. I also added /opt/kde/lib to make the system aware of the KDE libraries as well. Next, I ran the command /sbin/ldconfig to make the system aware of the changes. Some of the KDE documentation out there recommends that you set an environment variable called LD_LIBRARY_PATH, but if you do the edits mentioned above, I think it nullifies the need to set the LD_LIBRARY_PATH. I'm sure some readers can clarify this in the comments below.
Next, I opened up my ~/.bashrc file and added some environment variables. This is what my .bashrc looks like for a regular non-root user on my system:
# .bashrc
# User specific aliases and functions
KDEDIR="/opt/kde"
QTDIR="/opt/qt"
PATH="$KDEDIR/bin:$QTDIR/bin:$PATH"
export KDEDIR QTDIR PATH
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
The code in bold is the most important since KDE and Qt rely on these variables to be set. Please note, I installed KDE in /opt/kde and Qt in /opt/qt. If you use the script above be sure to modify the paths to match the installation directories you chose. Also, if you use a distribution other than Red Hat 8.0, you may want to delete the # Source global definitions section.
The next thing I did was create a .xinitrc file in my home directory. When you startx from the console, X looks for this file for initialization instructions. This .xinitrc basically tells X to execute the startkde script which ensures KDE starts up in an orderly fashion. This is what mine looks like (it's quite simple):
# .xinitrc
/opt/kde/bin/startkde
Next, I opened up my /etc/inittab file to change the line, id:5:initdefault: to id:3:initdefault:. This basically tells the system not to start X when it boots up (and also stops the graphical login from starting). Lastly, I created a new user called kde, and placed (with the correct file permissions) the .bashrc and .xinitrc created above into /home/kde. At this point I rebooted my machine, logged in as kde, typed in startx, and a few seconds later I was greeted with the beautiful new KDE splash screen.
So, how does it look!?

Figure 2: Introducing The Beautiful New ksplash
- "Introduction, Installing Qt and arts"
- "Installing kdelibs, Setting up the environment"
- "Fonts, Icons"
- "Window dressing, Putting the O in OS, Conclusion"



