Tag Archives: openSuse

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

PEBKAC

Everything went OK, except:

– in the partition manager I’ve accidentally messed the mount point for my old /home and /data drives -.-”

– like an experienced Linux hacker I’ve downloaded the nvidia driver binaries a gcc, make, kernel-source / header and started to cook up a new driver, the result was: a totally empty grub loader. After a few kernel panics I’ve started the system manually from grub’s command line thanks to this guide: http://en.opensuse.org/SDB:The_Boot_Manager_Grub. Conclusion: wiki 1st.

There were no problems with openSUSE at all.

*PEBKAC (“Problem Exists Between Keyboard And Chair”)

openSUSE 11.2 Milestone 7

Hi!
The openSUSE community released the 11.2 M7 on September 10 – yes I know it was about 15 days ago… so there is nothing new in this post :D. I’ve just wanted to publish some screenshots from my VirtualBox about the upcoming release of openSUSE.
For the complete list of changes see http://en.opensuse.org/Factory/News.

The bootloader is still using the old 11.1 artwork – it’s a bug feature:

From openSUSE 11.2 Milestone 7
From openSUSE 11.2 Milestone 7

The new KDE4.3 artwork – KDM login screen (Air theme):

From openSUSE 11.2 Milestone 7

Improved widgets and usability, the desktop themes are using more gradient/blur it’s looking very cool now:

From openSUSE 11.2 Milestone 7

The redesigned YaST interface:

From openSUSE 11.2 Milestone 7

You can download the Milestone 7 from: http://software.opensuse.org/developer. Remember, this version is only for testing, for the latest stable version visit: http://software.opensuse.org/.
… and of course, Have a lot of fun! 🙂

openSUSE HCL – ideas

In the past few days we have a little conversation about openSUSE HCL http://forums.opensuse.org/general-chit-chat/421857-opensuse-hcl-idea-improve.html and about some new ideas to improve it:

  • search-based HCL – like http://www.ubuntuhcl.org/ instead of showing wiki-pages there is a search form with advanced filtering options – what definitely reduces the search time. It would be also practical if you’re searching for a specific hardware or you just want to browse the list of hardwares by the selected manufacturer to see, which devices are supported.
  • input forms for new entries Do you know the wiki-syntax? The most basic formatting options are easy to learn, but it’s still required to know if you want to add a new hardware or configuration to the HCL. My opinion is, that for a newbie user it’s a critical point to finish your contribution. Modifying the data using forms would be simpler then browsing through a long wiki-page to modify a word or two.
  • These are my reasons for building a new HCL. What do you think about it?

    Traffic Limit on Linux

    On the Unix-like operating systems the user can choose from many advanced tools to control the network. My opinion is that these tools are too advanced (for an everyday user – no programmers, admins, hackers 🙂 ) – so after some searching I’ve found a little script what can be easily modified and executed to limit the network speed.
    Grab this script from http://lartc.org/wondershaper/. Extract it, then with your favorite text editor open the script called wshaper. Intuitively, these lines:

    DOWNLINK=256
    UPLINK=64
    DEV=eth0

    are indicating the upload, download speed (in kilobits!), and the network interface. After modifying these parameters you need to comment out the following two lines:

    echo Please read the documentation in ‘README’ first :-\)
    exit

    by adding the # sign to the beginning of these lines. Save your script. Open the console window and navigate to the directory which contains the script wshaper, get root powers with

    su

    and execute the script:

    sh wshaper

    .

    A little speedup.
    Use command line for every action. Command line is x10 faster then any GUI application. It’s easy to learn and use. Use the edit command for editing the wshaper script (assuming the you can navigate in console with cd command):

    edit wshaper

    . When the editor loads the script with arrow-keys navigate to the lines what you want to modify. Press A – now you can write into the text – and modify the values. To save, press the : key (SHIFT + ;) and type:

    save wshaper

    . Use the same commands to execute the script:

    su
    sh wshaper

    .

    Gimp 3.0 RC


    More Photoshopis for Photoshopers. But it’s still Gimp. 🙂
    There was a little discussion about Gimp, and his user-unfriendly attributes. Here i found this picture about 3.0 Release Candidate. The UI looks better… IMHO it is more professional. What do you think?

    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.