Overview of steps to build KDE from trunk using single user approach

After some of my friends asked me how, I wrote this article which lists out the steps I took to switch from the additional kde-devel user approach to the single user approach while building KDE SC from trunk. It might be helpful for newbies who have followed the instructions on techbase and got a working KDE SC trunk with the separate kde-devel approach.

(Its being assumed that the single existing user is called “userabc” from this point onwards, and that the reader has read or has already built KDE SC as per instructions here)

The first step to do would be to copy the existing userabc's .bashrc to a new file, which I call develrc (you can call it anything you want) then appending it with the example .bashrc from here or if you've already built KDE SC with the kde-devel user, just copy the kde-devel .bashrc as userabc's develrc .

Now, to switch to the development environment, just source the develrc (when running the userabc's terminal run 'source develrc') and it will set the paths accordingly. Now, move the kde/src files from the kde-devel user to userabc. Next, change the owner of the source to userabc, like this-

chown -R userabc kde/

chgrp -R userabc kde/

Following the usual procedure, we compile Qt4, kdesupport, kdelibs, kdepimlibs, kdebase, kdeplasma-addons (optional) and if everything goes as planned, the build will be ready. At this point, one should be able to run the apps from trunk by source'ing the develrc and running the command (e.g. dolphin).

The next step is to create a new startkde script so that we can start the trunk/build KDE SC. For this copy the develrc into a new file (I'll call it startkde4) and append the following line at the end [1]

exec startkde

and the following line at the top-

#!/bin/bash

The last step is to make it possible to have two entries in KDM so that we can choose at login between the stable and the trunk/build version. For this, we make a new copy of /usr/share/xsessions/kde.desktop as /usr/share/xsessions/kde4.desktop and then change its contents to look like this-

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/home/userabc/startkde4
TryExec=/home/userabc/startkde4
Name=KDE-TRUNK

If there were no problems in any of the above steps, there should be an option KDE-TRUNK in KDM's sessions menu. Enjoy!

If you find any errors, or have a suggestion, please feel free to post a comment. Thanks !

[1] It should be possible to make a startkde4 script which sources develrc and then exec startkde. Somehow this doesn't seem to work with bash (David Faure's original startkde4 script uses zsh, which might work).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s