← KWin/Building You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in one of the groups: Users, Administrators, trusted, KDEDevelopers. You can view and copy the source of this page. There are several options to build KWin from sources. The easiest one is probably to use [http://kdesrc-build.kde.org/ kdesrc-build] and just build the module ''kde-workspace''. But it's also possible to build KWin standalone without the other parts of kde-workspace. This article aims to describe how to build current master. = Obtaining Source Code = KWin is part of the kde-workspace module and is located in the sub-folder ''kwin'' of this module. To obtain the KWin source code you have therefore to clone the git repository: <syntaxhighlight lang="bash"> git clone git://anongit.kde.org/kde-workspace </syntaxhighlight> In case you cannot use the git protocol please have a look to the [https://projects.kde.org/projects/kde/kde-workspace/repository repository website] for other options. = Dependencies = The dependencies to build KWin should best be resolved using your distribution. On Debian based systems just use: <syntaxhighlight lang="bash"> sudo apt-get build-dep kde-workspace </syntaxhighlight> Given that the KDE 4 libraries are currently frozen it should be possible to build KWin with kdelibs version 4.8 or later. = Running cmake = First create a directory where you want to build kwin, which we assume to be in $BUILD. Furthermore create a directory where to install to, which we will call $KWIN_INSTALL_DIR. We assume the cloned kde-workspace repository is located in $KDE_WORKSPACE Now run cmake from the build directory and specify the build options you want to have. KWin specific build options are documented on [http://techbase.kde.org/Projects/KWin/Build_Options techbase]. <syntaxhighlight lang="bash"> cd $BUILD cmake "$KDE_WORKSPACE" -DCMAKE_INSTALL_PREFIX=$KWIN_INSTALL_DIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKWIN_BUILD_OXYGEN=OFF \ -DKDE4_BUILD_TESTS=TRUE </syntaxhighlight> = Build and install = After cmake has run sucessfully you can just make and make install from the kwin directory in your build tree: <syntaxhighlight lang="bash"> cd $BUILD cd kwin make make install </syntaxhighlight> = Oxygen = The default window decoration Oxygen is known to provide problems from time to time when running KWin from master. The reason is that the decoration shares an internal library with the kstyle. This can resolve in ABI problems and if KWin is started with an Oxygen linked against an old version it won't start. The easiest solution to this problem is to configure a different window decoration for the custom built KWin. = Running KWin = Now after successfully building KWin all that is left is adjusting your local environment, so that it finds your KWin version. For an overview on available variables to adjust have a look at [http://techbase.kde.org/Getting_Started/Build/Environment Build/Environment]. <syntaxhighlight lang="bash"> export KDEDIR=$KWIN_INSTALL_DIR export KDEDIRS=$KDEDIR:$KDEDIRS # remove the added $KDEDIRS if you don't want to find your distribution KDE version # Add the KDE plugins to the Qt plugins path export QT_PLUGIN_PATH=$KDEDIR/lib/kde4/plugins # Export the standard paths to include KDE export PATH=$KDEDIR/bin:$PATH export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=$KDEDIR/lib/pkgconfig:$PKG_CONFIG_PATH </syntaxhighlight> In case you don't want KWin to pick up your standard configuration file, also adjust $KDEHOME, please see referenced documentation above. To start KWin from this environment just run: <syntaxhighlight lang="bash"> kwin --replace & </syntaxhighlight> In case you run from a tty, don't forget to export the $DISPLAY variable. You can also start KWin on an embedded X-Server (Xephyr) or in a separate X session by adjusting the $DISPLAY variable. Templates used on this page: Template:Box (view source) Template:Info (view source) Return to KWin/Building. Retrieved from "https://community.kde.org/KWin/Building"