Build It

Building Kate from Sources on Linux

Right now, Kate’s source code is located on the GitLab instance.

This how-to explains how to build Kate without touching your stable KDE installation.

Install dependencies

Make sure you have the following packages installed: git and the KF5 development package (and CMake).

  • openSUSE

    sudo zypper in libgit2-devel gettext-tools extra-cmake-modules \
      libQt5Widgets-devel libQt5Xml-devel libQt5Test-devel \
      libQt5Gui-devel libQt5DBus-devel libQt5Concurrent-devel \
      libqt5-qtscript-devel libQt5Sql-devel ktexteditor-devel \
      kactivities5-devel kiconthemes-devel kguiaddons-devel \
      kcrash-devel kdoctools-devel kinit-devel kwindowsystem-devel \
      kdbusaddons-devel kwallet-devel plasma-framework-devel \
      kitemmodels-devel knotifications-devel threadweaver-devel knewstuff-devel

  • Ubuntu and derivates

    sudo apt install qtbase5-dev qtscript5-dev
    extra-cmake-modules plasma-framework-dev libkf5crash-dev \
      libkf5config-dev libkf5activities-dev kinit-dev kdoctools-dev \
      libkf5i18n-dev libkf5parts-dev libkf5guiaddons-dev libkf5iconthemes-dev \
      libkf5jobwidgets-dev kio-dev libkf5texteditor-dev \
      libkf5windowsystem-dev libkf5xmlgui-dev libgit2-dev libkf5wallet-dev \
      libkf5service-dev libkf5itemmodels-dev \
      libkf5notifications-dev libkf5threadweaver-dev libkf5newstuff-dev

  • Fedora/RHEL/CentOS

    sudo yum install git cmake gcc-g++ extra-cmake-modules qt5-qtbase-devel \
      qt5-qtscript-devel kf5-kiconthemes-devel kf5-kxmlgui-devel \
      kf5-kwindowsystem-devel kf5-ktexteditor-devel kf5-kparts-devel \
      kf5-kguiaddons-devel kf5-kinit-devel kf5-kdoctools-devel kf5-kcrash-devel \
      kf5-kactivities-devel kf5-kdbusaddons-devel kf5-kwallet-devel \
      kf5-knewstuff-devel kf5-threadweaver-devel kf5-kitemmodels-devel \
      kf5-plasma-devel kf5-knotifications-devel libgit2-devel

Prepare the Kate sources

  • create and change into a KDE development directory:

    mkdir -p ~/kde/usr
    cd ~/kde

  • get a copy of the Kate code:

    git clone
    cd kate

NOTE: If you want to build KTextEditor (the editor component), you need to follow exactly the same steps, but replace ‘kate’ with ‘ktexteditor’ everywhere.

Your copy of Kate contains all of the Kate code, i.e.: Kate, KWrite and all bundled plugins.

Configure Kate

  • create and change into a build directory inside the kate directory for compilation:

    mkdir build
    cd build

  • run the configure process with cmake:

    • For just using Kate, build it optimized but with debugging symbols to get useful backtraces for bugreports:
      cmake .. -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):
      cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/kde/usr \

Build & Install

  • compile Kate:


  • 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.

Run the self-compiled Kate

Now you can run the compiled Kate version from you shell via kate after sourcing the in your build directory.


Keeping Kate up-to-date?

You can keep your copy up-to-date by typing:

cd ~/kde/kate
git pull --rebase

Contribute back!

Feel free to create a merge request at For more information see Join Us.

Get Support?

If you have questions you can ask them on our mailing list and/or join #kate on

For more information see Get Help.

Building Kate from Sources on Windows

To build the KF5 based Kate/KWrite you can follow the guide on KDE on Windows.

Building Kate from Sources on macOS

To build the KF5 based Kate/KWrite you can follow the guide on KDE on macOS.