Get It – KDE 4.x

Building Kate from Sources

This quick howto explains how to build Kate without touching your stable KDE installation. Right now, Kate’s source code is located on To build Kate from git, you need KDE SC >= 4.8. Further,

      1. make sure you have the following packages installed: git and the kdelibs development package (and CMake).
        to install on openSUSE: sudo zypper install git libkde4-devel libkactivities-devel libqjson-devel python-kde4-devel
        to install on Ubuntu and derivates: sudo apt-get install g++ make git cmake kdelibs5-dev libqjson-dev python-kde4-dev python-qt4-dev
        to install on Arch Linux: pacman -S git automoc4 cmake kdebindings-python (installation with base-devel + kde)
        to install on RHEL: yum install gcc-c++ kdelibs-devel kactivities-devel qjson-devel sip-devel PyKDE4-devel
        to install on Fedora: yum install gcc-c++ kdelibs-devel kactivities-devel qjson-devel sip-devel pykde4-devel git-core
      2. create and change into a KDE development directory:
        mkdir -p ~/kde/usr; cd ~/kde
      3. get a copy of the Kate code and switch to the KDE 4.14 branch:
        git clone git://
        cd kate
        git checkout KDE/4.14
      4. create and change into a build directory inside the kate directory for compilation:
        mkdir build; cd build
      5. Use a script as shown below to set the right environment variables, else make install might fail later.
      6. run the configure process with cmake: (-DBUILD_KTEXTEDITOR=1 will install new ktexteditor interfaces from kate.git, otherwise, you need up-to-date kdelibs)
        For just using Kate, build it optimized but with debugging symbols to get useful backtraces for bugreports:

        cmake .. -DBUILD_KTEXTEDITOR=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
                      -DCMAKE_INSTALL_PREFIX=~/kde/usr \

        For developing Kate, build it with debug support (if you have problems using gdb because of optimizations, swap Debug with DebugFull):

                      -DCMAKE_INSTALL_PREFIX=~/kde/usr \
      7. compile Kate:
      8. finally install Kate:
        make install
        This installs Kate locally into the separate directory ~/kde/usr, so that your global KDE installation will not be touched at all.
      9. Now on to starting the newly compiled Kate. Create a file ~/kde/ with the following content:
        export KATE_DIR=~/kde/usr
        export PATH=$KATE_DIR/bin:$PATH
        export KDEDIR=$KATE_DIR
        export KDEDIRS=$KDEDIR
        export XDG_DATA_DIRS=$XDG_DATA_DIRS:$KATE_DIR/share
        # update KDE's system configuration cache
        # start app

        Make the script executable with chmod 755 ~/kde/ Now you can run the compiled Kate version with ~/kde/ kate. Just calling kate directly will start the system version of Kate.

Your copy of Kate contains all of the Kate code, i.e.: the KTextEditor interfaces, Kate Part, KWrite and the Kate Application. You can keep your copy up-to-date by typing `git pull --rebase` in ~/kde/kate. Feel free to send patches to our mailing list And join #kate on :–)

Building the Kate Handbook

The current stable version of the Kate Handbook is available on the KDE documentation webpage. We very much welcome any updates to improve the Kate’s documentation. The source of the documentation is in the “doc”-subfolder. To create the final html pages, switch to the “doc”-folder and first create a folder called “html/kate” and “html/kwrite”. Here all the html ouput of the *.docbook files will be generated. Then use meinproc4 to generate the html ouput:

mkdir -p html/kate
mkdir -p html/kwrite

# build Kate documentation
cd html/kate
meinproc4 --check ../../kate/index.docbook

# or build KWrite documentation
cd html/kwrite
meinproc4 --check ../../kwrite/index.docbook

After a short moment the generation of the documentation will be finished. Then point your web browser e.g. to ~/kde/kate/doc/html/kate/index.html to view the result. We are very happy for every patch!

Building the API Documentation

Creating the API documentation for the KTextEditor interfaces works by entering the following commands:

cd kate/ktexteditor
/path/to/kdelibs/doc/api/ --recurse \
    --doxdatadir=/path/to/kdelibs/doc/common ./

The API documentation is then generated into the subfolder kate/ktexteditor/ktexteditor-apidocs.

2 thoughts on “Get It – KDE 4.x”

Leave a Reply

The Kate Editor Homepage

%d bloggers like this: