Category Archives: KDE

Getting started with KDE development on openSUSE

Hi!

In this guide I’ll share my experiences and show you how to get started with KDE development. This article is based on the opensuse-wiki article on my personal solutions and on the helpful suggestions from the guys on #kde-devel channel.

If you are looking for something more official take a look to KDE TechBase.

Requirements:

    1) Space required for source files, executables, etc. is ~6.5GB (yes, pretty huge because building with full debugging symbols).
    2) Build dependencies: Here is the list for several distributions.
    3) an svn client

The openSUSE KDE team also provides two scripts kde4-run-env, kde4-build-env to set up the environment variables for the build dependencies (2).

  • Set up the environment

Some guides are suggesting the use of different startup scripts also. However I’ve created a new user for KDE development to protect my stable KDE configurations from my mistakes:

useradd -m -G users,audio,video -s /bin/bash kde-devel

you can do it without the -G option – like I did – If you want to create a user with default groups. And finally set a password for this user:

passwd kde-devel

Now you can continue your work on different ways, I did the following: my graphical session is running on tty6 and i started a new terminal session on tty1. To switch between terminal sessions use the <Ctrl>+<Alt>+<Fn>, n = 1,…,12 key combinations. This isn’t the best solution from the view of debugging because you can’t use clipboard between your terminal and graphical session and if something goes wrong and you need to copy+paste an output to the IRC channel/forums then this operation takes extra time.

So, Instead of switching to a new terminal session open your terminal emulator in your graphical session – Konsole – and log in with the kde-devel user and jump to the home directory:

su kde-devel
cd ~

Copy the scripts kde4-run-env, kde4-build-env into kde-devel‘s home directory. and add the following line to the~/.profile:

. ~/kde4-build-env

Now execute the script kde4-build-env with

. kde4-build-env

– actually re-logging with kde-devel have the same effect.

  • Download the sources

We’ll store everything what is related to KDE sources/build in the directory kde. Under kde create a subdirectory for the sources, and finally jump into the sources directory:

mkdir ~/kde/sources
cd ~/kde/sources

Now get the directory structure of KDE svn trunk:

svn checkout -N svn://anonsvn.kde.org/home/kde/trunk

with the -N option you are getting only the root directories without its contents. This will be useful later, after every checkout take a look to the current directory structure – just to see what are you doing.
So, you’ve checked out the trunk directory, go there

cd trunk

and check out the remaining directories.

svn up -N KDE
cd KDE

KDE is the last directory on the svn before the three module directories: kdebase kdelibs kdepimlibs – containing: base runtime elements, Personal Information Management modules and the basic libraries. Check out the sources for every module with:

svn up kdelibs kdepimlibs kdebase.
*This may take some time depending on your network connection speed.

  • Build the sources

We have all the sources just need to build them. The command cs is provided by the script kde4-build-env – if you’ve added the script properly to the .profile. First we need to build the kdelibs directory. Change the source patch to kdelibs with:

cs KDE/kdelibs

and start to build kdeblis:

cmakekde
*This may take some time depending on several factors, like systems load, CPU speed, etc.

Repeat this for the remaining modules:

cs KDE/kdepimlibs
cmakekde
cs KDE/kdebase
cmakekde

Remember, you can pause the building/compiling with <Ctrl>+<Z>:
[1]+ Stopped cmakekde
and resume with:
fg 1.

  • Run KDE 4

You can start from the terminal or with KDM. I started from a terminal session the KDM way is seems to be more complicated to implement.
Create a script runKDE:


#!/bin/bash
echo Setting up the KDE runtime environment.
. kde4-run-env
echo Starting the DBus session.
eval `dbus-launch --auto-syntax`
echo Starting the X server.
export DISPLAY=:1
X -novtswitch $DISPLAY &
echo Starting KDE 4 on tty8
sleep 2
startkde

and copy into /home/kde-devel/. Log out with kde-devel in your Konsole session. Switching between terminal sessions explained under “Set up the environment”. Now switch to tty1 and login as kde-devel and run the script runKDE:


./runKDE

if the script doesn’t switch automatically to tty8 – where your KDE is starting – then switch manually. The first start takes more time because KDE is build the configuration from scratch.

  • SVN Changes

For updating the sources just do:

cs KDE
svn up kdelibs kdepimlibs kdebase

and repeat the steps under “Build the sources”.

It’s possbile that while trying to “svn up” your sources svn returns with an error like:
No such revision X. This happens because the synchronization between the mirrors providing the sources for the anonymous svn. Wait a few minutes and try again.

All comments and corrections are appreciated.

Happy hacking!

KDE 4 trunk

Plasmoids

KDE 4 turnk

Desktop

Advertisements

Some good news

KDE 4.1.1 is out!
The most important changes:

  • Significant performance, interaction and rendering correctness improvements in KHTML and Konqueror, KDE’s webbrowser
  • User interaction, rendering and stability fixes in Plasma, the KDE4 desktop shell
  • PDF backend fixes in the document viewer Okular
  • Fixes in Gwenview, the image viewer’s thumbnailing, more robust retrieval and display of images with broken metadata
  • Stability and interaction fixes in KMail

Kudos for the developers and for the community. KDE 4 is changed significantly since <4.0. The new Plasma technology is fast and very useful. At this time it has some screen corruptions with my GeForce Go 6100 card, but they are caused by nVidia's driver. Good news: nVidia is hiring programmers for linux driver development :).

More about KDE 4.1.1.

Kalzium

The truth is: Hmmm… I don’t like chemic.
“I don’t like chemic.” – Just to clear out: I can say a lot of bad things about chemic instead of “I don’t like”. 🙂
I have studied it in elementary and in secondary school. Chemic was my nightmare.
Today I’m wanted to find some useful(free&linux) application about it,to my friend. After a quick search of the openSuse repositories somewhere in “Education” finally I found: Kalzium.


This program rocks. I’m browsed these molecular somethings for 30 minutes. I’m solved some functions (randomly of course), built some models, explored boiling/freezing point, etc. You can make even a 3D Rendering of molecular model. :0


If you have some experience in chemic you must to try it! It’s amazing.

You can read more/download Kalzium from KDE – Education portal. http://edu.kde.org/kalzium/
BTW visit the Education portal, maybe you can find something useful about other sciences.