How To Install KDE4 on Fedora 8

[This Guide was compiled by my Best Friend Januz . All Credit goes to him - Visit him ]

Compiling KDE 4.0.2 Stable on Fedora 8

This guide illustrates how to compile and setup KDE 4.0.2 Stable release on a Fedora 8 Werewolf desktop. For instructions on building the latest version from trunk, refer to the official KDE Techbase article at http://techbase.kde.org/Getting_Started/Build/KDE4 and Go2Linux forum guide at http://www.go2linux.org/forums/how-to-install-kde-4-on-fedora-t-8.html. Some of the steps in this guide are taken from the above sources and credit should go to respective authors.

Step 1 : Getting the sources

Create the directories for the KDE install. I chose to setup KDE in the /opt directory.

su -c "mkdir -p /opt/kde4/kde/src"


Give full access to the kde4 directory temporarily

su -c "chmod 777 /opt/kde4"


Download the KDE 4.0.2 source tarballs from http://kde.org/download/ to /opt/kde4/kde/src
The required tarballs for a basic install are :

http://download.kde.org/stable/4.0.2/src/kdelibs-4.0.2.tar.bz2
http://download.kde.org/stable/4.0.2/src/kdepimlibs-4.0.2.tar.bz2
http://download.kde.org/stable/4.0.2/src/kdebase-runtime-4.0.2.tar.bz2
http://download.kde.org/stable/4.0.2/src/kdebase-4.0.2.tar.bz2
http://download.kde.org/stable/4.0.2/src/kdebase-workspace-4.0.2.tar.bz2



Extract the tarballs

for i in *.bz2; do tar -jxvf $i ; done

If you're a neat freak like me, get rid of the tarballs to make it look pretty :)

mkdir tarballs && mv *.bz2 tarballs


Step 2 : Setting up the environment

Copy the sample .bashrc file from http://techbase.kde.org/index.php?title=Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc and append it to your existing .bashrc

We need to make some changes to the .bashrc to reflect the directory structure we require. In the KDE section, change the KDEDIR as follows:

export KDEDIR=/opt/kde4

Comment out the Qt section entirely. We are not building Qt from source.

#export QTDIR=$HOME/qt-copy

#export QT_PLUGIN_PATH=$KDEDIR/lib/kde4/plugins:$QT_PLUGIN_PATH
#export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH


Assuming you didn't have anything in .bashrc before you copied over the .bashrc from KDE.org, scroll down to line 52 and make the following changes.

export KDE_BUILD=/opt/kde4/kde/build
export KDE_SRC=/opt/kde4/kde/src


Save changes and exit.

Source the new .bashrc

source .bashrc

Now lets install some of the prerequisite packages.

sudo yum install clucene-core-devel libxml-devel libxslt-devel \
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \
bluez-libs-devel gcc-c++ libXext-devel cmake subversion giflib-devel \
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \
imlib2-devel patch gstreamer-plugins-base-devel


sudo yum install strigi strigi-devel

sudo yum install qt4-devel qt4-doc

sudo yum install blitz blitz-devel qimageblitz qimageblitz-devel




Step 3 : Build..build..build.

Finally it's time to build everything. The magic command is cmakekde. I illustrate the process below for kdelibs.

cd /opt/kde4/kde/src/kdelibs-4.0.2
cmakekde


You need to repeat the above process in the following order:

kdelibs-4.0.2
kdepimlibs-4.0.2
kdebase-runtime-4.0.2
kdebase-4.0.2
kdebase-workspace-4.0.2


If you're building other packages, the process is the same and the order does not matter.
Expect to spend about 1 to 2 hours to compile only the basic packages. (Depends on the speed of your computer)

Step 4 : Setup a new session

Assuming the build process went without any glitches, it is time to setup KDE4 as a login session.

su -c "cp /opt/kde4/share/apps/kdm/sessions/kde.desktop /usr/share/xsessions/kde4.desktop"


If you have an older version of KDE on your machine, to avoid confusion do the following change to /usr/share/xsessions/kde4.desktop

NAME=KDE4

Now you're all set. Logout from the current session and login again, but this time select "KDE4" as your session.


Trivia

Maybe it's me, but I couldn't find a link to the control center on the Kickoff menu. If you have the same problem, do the following:
Press Alt+F2 and type "system-settings" without the quotes and press enter.

KDE4 has some cool Compiz like effects. Be sure to enable visual effects to see them in action. Some key combinations to try are Ctrl+F8, Ctril+F9, Ctrl+F10
Some mouse gestures also work. For example, move your mouse over to the top left corner to get a Mac Expo like effect. I am sure there are many more, but this should be enough to get you started. Have fun !

* All Images are properties of their respective Owners

4 comments:

jalmillategui said...

If You have a x86_64 platform and are using 64bits

fedora 8, please install only the 64bits versions of alsa-devel, libxslt-devel and fontconfig-devel.

thanks fot the guide!!

best regards,

Javier

Saad Javed said...

I followed your guide and tried to compile kde4.0.3 on fedora 8. kdelibs compile fine but when i try "cmakekde" with kdepimlibs, it gives:

[kde-devel@localhost kdepimlibs-4.0.3]$ cmakekde
CMake Error: ERROR: Could not find KDE4 kde4-config
-- Configuring done
make: *** No targets specified and no makefile found. Stop.

Could you help me out?

Lee_B said...

@saad javed: you probably just need to delete your CMakeCache.txt file and run cmakekde again, now that you've setup all the dependencies.

Pavel said...

Hello



I am the author of the manual at the http://www.go2linux.org/ page.



One thing in your variation I didn't understand: if I am doing your way from the beginning in the first package kdelibs after calling cmakekde we are missing kdesupport package (error message: "CMake Error: Did not find automoc4 (part of kdesupport).").

So I had to check out the svn for that.

How did you manage to avoid this? Did you have the RPM of the kdesupport-devel installed?

Regards

Hitstudent