Some random news
The first one isn’t really random. KDE 4.2 was released on Tuesday Jan. 27th, 2009. This release has a LOT of new and interesting things for both users and developers. Anyway, I’m sure you have heard of that enough. For more information though, you can read the release announcement.
On another note, I have finally switched back to Fedora! well, I realized that although openSUSE is nice, but it’s still not me. Plus, I missed the livecd-tools and morally, Fedora sounded better! I mean, take SUSEstudio for example. It’s not free, and what Novell in doing with Microsoft is just not acceptable for me!
On another news, I am currently trying out GNOME, for a bit of fun. It’s not that bad, actually. In fact, it’s nice! I installed GNOME-Do and echo-icon-theme and it’s looking nice so far!
I have some random tips and tricks for Fedora which I will post soon, so keep in touch! =)
Is it solid enough?
I finally started pursuing my long-awaited desire to learn KDE libraries. As a matter of fact, I learned Qt because I wanted to code for KDE. But hey, here I am, kind of doing it after 1 year. Anyhow, let’s get straight to the point, I wanted to talk about Solid a little bit. If you don’t know what Solid is, take a look at http://solid.kde.org. In a nutshell, it’s a library which let’s you interact with the hardware. For example, with Solid you can find out if the system has webcam or not, if it has storage drives, and if it does, what kind are they, and plus, if you find the right hardware, you can do ’stuff’ with it, like in case of storage drives, you can mount it and unmount it.
So, enough with the introduction. What I really want to talk about is how awesome Solid is. I will give you an example. Last night, I started reading the Solid documentation from techbase.kde.org and I looked at the tutorials. I started reading them at about 7pm and finished at around 8. As soon as I finished reading the tutorials I was able to write a simple app which looks and finds the memory stick that is attached to the computer. It was absolute mind-blowing for me! I never thought I could do that kind of stuff! But today, I sat down (literally for hours and hours) and wrote a backup app, and I called it KBackedUp. For the actual backing up, it uses a script (http://code.google.com/p/backed-up) as its backend, so it doesn’t do the actual backing up, but it doesn’t the rest.
In the mean time, I also learned about QProcess and KDEUI libraries (KXmlGuiWindow is plain awesome) which I might talk about later. But for now,
Happy holidays!
Compiling KDE – Fedora: Running your build
So this is the last step in having your own KDE build. In this step, I will explain how you can run what you have built without any problem whatsoever!
What you need to do is:
1- make kdm recognized
2- run kde!!
And to make KDM recognized and to actually use it, you have to access /etc/sysconfig/desktop file and change the DESKTOP and DISPLAYMANAGER values. To do that, first check if you have a file called ‘desktop’ in directory /etc/sysconfig. Then open it with a text editor (e.g. vi, emacs, nano, gedit, whatever) but MAKE SURE that when opening the file, you have admin privileges:
$ su -c 'vim /etc/sysconfig/desktop'
Now you are ready to change the values. What you see is this:
DESKTOP=blahblah
DISPLAYMANAGER=blahblah
And change it to:
DESKTOP=KDE
DISPLAYMANAGER=KDE
Now just change runlevels (5 to 3 and back to 5) or just reboot your system.
The next time, you see KDM as your display manager and then you can log in to KDE
And happy KDEing!!!
Note: all the credit goes to rdieter (on IRC, freenode, channel #fedora-kde) for telling me all this stuff
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
Compiling KDE – Fedora: Dependencies
As promised in the previous post, I started compiling KDE from svn, using again kdesvn-build script. Without further saying, I present you, ladies and gentlemen, the list of deps:
KDESUPPORT
avahi-devel
boost-devel
cmake
cups-devel
qt-devel
svn
make
raptor-devel
redland-devel
postgresql-libs
clucene-core-devel
gcc-c++
bzip2-devel
libxml2-devel
expat-devel
xine-lib-devel
gstreamer-devel
glib2-devel
dbus-devel
cppunit-devel
hyperestraier-devel
KDELIBS
pcre-devel
libxslt-devel
giflib-devel
KDEPIMLIBS
gpgme-devel
libical-devel
KDEBASE
libXcomposite-devel
libXdamage-devel
libXtst-devel
alsa-lib-devel
PyQt4
libxklavier-devel
xmms-devel
libsmbclient-devel
libusb-devel
lm_sensors-devel
OpenEXR-devel
pulseaudio-libs-devel
pciutils-devel
libxkbfile-devel
KDENETWORK
libidn-devel
qca-ossl
I’m sure you have noticed some different packages like redland and raptor, this time, instead of installing soprano-devel or strigi-devel, I installed their deps. Just another way to do it.
P.S. Just for the fun of it, this time I didn’t use kdesvn-build and built everything into /usr. I will write another post on how to compile KDE manually without any kind of script. Then you can write your own script to make it even easier to update it!
And, you have more control over what actually happens!
Trying out F10 almost-preview (rawhide one day before preview release)
I just finished installing F10 Beta and updated it so it’s now almost-preview release (rawhide). Just one word would describe it: Fantastic. Much much better than F9. I can’t believe the speed this thing is advancing. Truely amazing. The wallpaper is the first thing I noticed which is really nice. And I haven’t noticed any other things as it has been only 5 minutes. But this week I will try to compile kde svn on it, see how that goes. I will most probably use some deps from opensuse (see previous posts). Anyhow, I have to get going (to bed). See you all later when I come with a list of deps for F10!!!
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.
Building KDE from svn: using kdesvn-build
There are some things you have to be aware of when compiling KDE from svn with kdesvn-build. There has been some problems that I encountered when compiling kde, but I don’t clearly remember them, so I will suffice to the solution for now:
To use the current strigi library (the one you manually compiled with kdesupport), do this in the terminal:
$ export STRIGI_HOME=/home/$USER/kde/
remember that you have to do it after you have compiled kdesupport.
When building kdebase, make sure you remove soprano-devel. kdebase will mistakenly use the old soprano-devel rather than the one compiled with kdesupport.
Building KDE from svn: dependencies
So here is the list of dependencies I promised in the previous post:
OpenSUSE
alsa-devel
automoc4
avahi-devel
boost-devel
cmake
patch --> qt-copy
cups-devel
giflib-devel
kde4-filesystem
libQtWebKit-devel
libakonadiprotocolinternals-devel
libgpgme-devel
libqimageblitz-devel
libqt4-devel
libsmbclient-devel
libsoprano-devel
libtiff-devel
libxslt-devel
phonon-devel
shared-mime-info
strigi-devel
xine-devel
svn
make
libbz2-devel
hal-devel
avahi-compat-mDNSResponder-devel
mysql-devel
libjasper-devel
libical-devel
Yes, I compiled (am compiling right now, kdebase and it’s 94%) kde on OpenSUSE just for fun! I’ll play with OpenSUSE a little bit until F10 comes out, and then I’ll be back to my beloved Fedora!!
Note that this list is for OpenSuse, BUT, the deps are the same for almost every other distro. Therefore, with a little bit changing the names according to your distros package naming conventions, you can get the same stuff. For example, in Fedora, libsoprano-devel would be soprano-devel and libQtWebKit-devel should be something like QtWebKit-devel.
Being on the edge
I’m trying again to build KDE4 from svn. This time, I will use kdesvn-build. I have done it before, successfully, on OpenSuse, but this time I want to do it on Fedora. Right now it’s downloading the sources. What I really wanted to do, in fact, was that I wanted to make a complete list of dependencies for building KDE4 from scratch. I freshly installed F9 on my laptop and without updating nor installing anything, I download kdesvn-build script and install svn and gcc-c++. Now one by one, whenever it fails, I look at the logs and find out what is missing. So far, I need patch and cmake. Stay updated as I will post the list of deps as soon as they are available