Compiling KDE – Fedora: Building
Building KDE is very easy. The only thing you need to do is:
1- Download the source code
2- Configure it with cmake
3- make && make install
Downloading the source code:
We will start from the first step. To get the source code, we will use svn:
$ svn checkout svn://anonsvn.kde.org/home/kde/...
and you replace ‘…’ with the module you want to download.
Before you download the source codes, create a folder in you home directory where you would put your sources. (Just to be more organized). I created a directory called “kdesvn” in my home:
$ mkdir ~/kdesvn
then we ‘cd’ into the created directory:
$ cd ~/kdesvn
Now we download the source codes into this directory using svn:
$ svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport kdesupport
$ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs kdelibs
$ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs kdepimlibs
$ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase kdebase
the argument after the URL is the name of the local folder (what you want the directory you are downloading be called on your computer).
We are finished with the first step!!!
Configuring it with cmake:
now that we have downloaded all the source codes, we need to configure it and prepare it for building and installing. To do this, we use cmake (simply because the source code requires us to use it):
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
don’t get scared. We just run cmake with two arguments, the first argument (-DCMAKE_INSTALL_PREFIX), as the name applies, is where you want the application to be installed. I just chose /usr because it’s easier than installing it to ~. The second argument (..) is the directory you want to configure (and .. means parent directory and . (dot) means current directory).
Before starting to configure, we go to each directory of the source code and we create a ‘build’ directory in each of them (again, just to be more organized, and it’s good practice):
$ cd ~/kdesvn/kdesupport && mkdir build && cd build
and then we ‘cd’ into the ‘build’ directory.
And now is the time to configure the fabulous source code!
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
if you have installed all the requirements, this shouldn’t give you any problems (as long as the source code itself is not screwed up).
And finally building it:
building the configured source code is dead easy! Just do make && sudo make install that’s all!
$ make
$ su -c 'make install'
The next post will be about how to actually run your build. So keep up
Building KDE from svn: running your build
After you build KDE from svn, you won’t see it in the Login manager (because there are .desktop files created for it), so you have to run it manually! How to do it is easy as ummmm….pick a name
Only thing you do is that you should add your kde binary files to your PATH. To do this, open ~/.bashrc and add these lines to it (before the last line):
export PATH=/home/$USER/kde/bin:$PATH
and replace $USER with your username, say “John” (without quotes)
Now, logout, and when you are in Login screen, press Alt+Ctrl+1 (or 2, or 3, up to 6).
You’ll be greeted with a black and deadly screen (it’s not so deadly, believe me). Now in there, login as yourself. It asks you for your username and password. After you enter them, you will go to a normal prompt just as when you open up a terminal. Now type:
$ xinit -- :1
You just started an X server. One which you can start your kde into.
You have now a terminal in from of you. To start kde, just type:
$ ./kde/bin/startkde
and live happily ever after
Welcome to the latest KDE build EVER!!
for logging out, just close the terminal, then you will go back to the prompt, then press Ctrl+Alt+7 to get back to the login manager.
And here present, Tic-Tac-Toe 0.4!!
I has been sitting there in the svn for a few days now, but I didn’t have the time (school?) to pack it into a tarball (.tar.gz archives) and blog about it. So here it is, ummm among the (rather few) improvement, is a counter which keeps track of your scores for you! Also there are three more options for saving states of the game and the window and whether you want the counter to be shown on startup or not! And also I had to fix some layout issues for the counter. It’s mostly about the counter.
And I’m displeased to announce that I can no longer think about how to improve this game (I wish I could still work on it). So PLEASE (note the capital letters) if you can think of ANYTHING that would improve this game, post a comment or email me or report a bug/wish. It would be really appreciated!
and as always, the download link:
http://code.google.com/p/onlinetictactoe/downloads/list
P.S. By the way, I’m going to talk about SVN and how to use googlecode’s svn repository in the next post!!
Another attempt: building KDE 4 SVN checkout
NOTE: LOOK AT Another attempt: building KDE 4 part 3 AND part 4 TO SEE WHICH ONE YOU’RE INTERESTED IN DOING. YOU WILL NOT NEED THIS IF YOU’RE GOING TO USE THE SAFER PART 3.
ok, here we have all the dependencies ready to go and there just remains our time to be spent on compiling KDE 4 itself ![]()
WARNING: THIS STEP MUST BE DONE IN ONLY NORMAL USER. NO ROOT USER PLEASE. IF IT NEEDS YOU TO ENTER ROOT PASSWORD, REVIEW AND SEE WHAT YOU HAVE DONE WRONG.
first thing you should do, is that you should make a new user account to be used by KDE 4 ( just in case ).
to do it, go to ( for KDE ) Kmenu > system > users and groups ( for GNOME ) System > Administration > users and groups
make a new account and login to that account ( simply log out, and then log in again )
make a new folder wherever you want ( definitely not in root folder ) that you put your sources in it.
for this “tutorial” I will use /home/KDE4devel/SRCs/
go to that folder and open a Terminal/Konsole which points to that folder by using this command
cd /home/KDE4devel/SRCs/KDE/
now, you should download the sources of KDE 4 into this folder you just created. if you want to use fancy names, call it check out SVNs ( es-vi-enz )
to do this, just open Terminal/Konsole and type:
1) svn co -N svn://anonsvn.kde.org/home/kde/trunk/KDE
2) svn co -N svn://anonsvn.kde.org/home/kde/branches/KDE/4.0
if you want it really new and cutting edge, go for the first one, but if you prefer to back down a little bit ( not really much difference though ) go for the second one. But generally I’d suggest second one
now just type:
cd 4.0
svn list
svn up kdebase kdepimlibs kdelibs
if you want other packages also to be checked out, you can just put them in svn up. for example if you want to also checkout kdemultimedia and kdegraphics, you just type
svn up kdebase kdepimlibs kdelibs kdemultimedia kdegraphics (etc.)
wait for quite a long time till it finishes
you have just downloaded the source code of KDE 4. Next post, will be about compiling KDE 4.
Good luck