posted by Corey Taylor on Mon 11th Nov 2002 20:00 UTC
"Installing kdelibs, Setting up the environment"
Installing kdelibs

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 Red Hat Menu Icon "Packages" from the "System Settings" menu and proceeded to install CUPS by selecting it from the "Printing Support" section.

Figure 1: Dependency Hell
Figure 1: Dependency Hell
I tried once again to configure kdelibs, no dice. I hit rpmfind.net once again and found a file named cups-devel-1.1.15-10.i386.rpm for Red Hat 8.0. I figured, downloading other programs that had "devel" in the file names solved my other problems, so why should this situation be any different? Yes, as I expected, I needed the CUPS development files. You think I would have learned by now. Anyhow, now that CUPS was fully installed, the kdelibs configuration, compilation, and install finally succeeded and I was in the clear.

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
Figure 2: Introducing The Beautiful New ksplash
Like I said, the new KDE splash screen is gorgeous. The previous ksplash was very nice, but this is the best one yet, I think. As long as I've been using KDE, the splash graphics have always been a pleasing introduction to KDE. After answering a few very straightforward questions about my preferred language, desktop behavior, and style, I am finally presented with my freshly compiled KDE desktop.
Table of contents
  1. "Introduction, Installing Qt and arts"
  2. "Installing kdelibs, Setting up the environment"
  3. "Fonts, Icons"
  4. "Window dressing, Putting the O in OS, Conclusion"
e p (0)    43 Comment(s)

Related Articles

posted by Thom Holwerda on Fri 5th Sep 2008 21:47, submitted by KugelKurt
posted by Thom Holwerda on Fri 29th Aug 2008 19:44, submitted by irbis
posted by Thom Holwerda on Wed 13th Aug 2008 00:07, submitted by superstoned