KDE apps at the snap of your fingers

by Igor Ljubuncic on 15 December 2018

Are you a Plasma fan? And you want to develop KDE applications? This has just become easier and more fun than ever before.

In early November, we hosted a Snapcraft Summit in our London offices, a forward-thinking software workshop attended by major software vendors and Snapcraft engineers working at every level of the stack. Together, we sat down and helped bootstrap snaps of some really amazing products.

One of the participants was Harald Sitter, a longtime KDE developer and enthusiast. With more than one notch of experience on his snap belt, Harald joined us to think of innovative ways of making the publication of Qt and KDE applications easier and faster both for experienced developers as well as those just getting involved in this domain. Together, we came up with some really cool concepts and implementations for the KDE development stack, based on snaps:

  • Build-snap – this package is an essential snap that includes all the different build dependencies needed for KDE development – specifically the KDE Frameworks 5. If you want to create a new KDE application, this snap comes with the necessary libraries and tools for development. You can use the build-snap on any system, without having to worry whether your system satisfies the dependencies, or having to run virtualization, containers or other complex setups. You can also develop with the latest, bleeding-edge Qt, Qt Quick, Kirigami and Plasma toolkits without using any custom repositories. This approach also cuts down on boilerplate definitions that you normally have to put into the snapcraft.yaml file.


        source: https://anongit.kde.org/kblocks.git

        plugin: cmake

        build-snaps: [kde-frameworks-5-core18-sdk]

Speaking to Harald, he elaborated on his experience and his take on the build snap:

With the new build snap technology, KDE application snapping is much easier than before as less obscure code needs to be added to make a snap actually use the correct development files to build software against the content snap. Previously, we had to resort to manually creating tarballs with all necessary assets and then instruct snapcraft to unpack them correctly. Now, snapcraft takes care of setting this up, and the build snaps, by virtue of being snaps, can make use of all the goodness of the Snap Store (e.g. clear revisions, easy rollback). The build snaps, together with the forthcoming extension, will make snapping KDE software super easy by moving all cruft behind the scenes, and a simple snapcraft.yaml will know how to properly build KDE software.

  • Content snap – this package is an essential snap that includes all the runtime libraries for KDE applications. The use of the content snap will make your KDE experience consistent, both in looks and functionality. It allows multiple applications to share the same runtime libraries, reducing the effective disk footprint by up to 99%!The full stack for Qt (3D acceleration middleware, translations, etc.), on top of the core snap, weighs somewhere between 100 and 200 MB, while most applications (including translations, documentation, artwork) are below 10 MB. A good example is Kcalc. If one were to put all the absolutely necessary requirements for Kcalc into one snap it’d be about 90 or 100 MB in size. With the content snap, Kcalc weighs only 500 KB, and the rest is shared through the content snap.Again, much like the build snap, it allows for modular usage, without having to maintain complex work setups.


        command: kf5-launch kblocks


        - kde-frameworks-5-plug

        - home

        - x11

        - opengl

        - desktop



        content: kde-frameworks-5-all

        interface: content

        default-provider: kde-frameworks-5

        target: kf5
  • CMake improvements – the snapcraft CMake plugin is more generic. We have removed the reliance on make as the underlying build system, which enables the use of other build systems such as ninja. Several KDE snaps were refactored and successfully used build-snaps, including several games (KAtomic, Granatier and Bovo), utilities (for instance, the aforementioned Kcalc) and education programs (like KmPlot and KGeography). A number of other KDE application snaps were fixed or improved, and published in the store.

For instance, instead of:



        source: https://anongit.kde.org/kblocks.git

        plugin: cmake

        build-snaps: [kde-frameworks-5-core18-sdk]


            - -DCMAKE_FIND_ROOT_PATH=/snap/kde-frameworks-5-core18-sdk/current

One can write:



        source: https://anongit.kde.org/kblocks.git

        plugin: cmake

        build-snaps: [kde-frameworks-5-core18-sdk]

We also worked with Harald to reason through what would be contained in a snapcraft extension for KDE. This is currently work in progress, but should bring about some really useful features for developers.

KDevelop & Kirigami

Looking to the future, with cmake changes and the KDE extension in place, KDevelop will come with an integrated snap functionality. Developers who want to develop new applications using the KDE Frameworks will not need to worry about manually collecting and satisfying dependencies and putting everything together anymore.

Speaking of the future, while you’re waiting, you might want to check out the demo snap that showcases the new converged Kirigami framework, and allows both developers and users a taste of the new KDE using the new responsive, elegant, and open cross-platform QML-based toolkit.


There’s more! Plasma as a snap!

If you find the build and content snaps interesting, wait until you try the ENTIRE Plasma desktop. As a snap. The desktop comes as a standalone application, which you can run without making any changes to your underlying system. You also do not need to have the latest and greatest Linux distribution version to run the snap. If the system supports snaps, it will run the Plasma desktop.

Please note that this is still a tech preview and should not be considered for production. Because you’re installing in “devmode” it will have unfettered access to your system, much like a classically-packaged application. But you can install and test it easily:

snap install --edge --devmode plasma-desktop

You can test the desktop environment even on older systems. You can also test multiple versions in parallel, and have stable and bleeding-edge versions of the desktop living happily side by side without any library conflicts or clashes. The snap also integrates nicely into the SDDM login manager, so you have a seamless experience.

Plasma desktop

These are some of the many new features coming into the KDE world. Over the coming weeks, as we roll up improvements, you will be able to use the build and content snaps, which should make the development easier and faster. End users can already test some of the hot new stuff through the edge and beta channels in the Snap Store.

Stay tuned for updates.

Newsletter Signup

Related posts


在过去几个月我们发布了一些如何使用Rust,Java,C/C++和其他语言来开发snap桌面应用的文章。在这些从入门到精通的教程中,我们以一个代表性的snapcraft.yaml文件来介绍开发构建snap所需的具体细节。 今天,我们希望脱离这一过程,而将重点放在服务器端。我们将为你提供一个包含两个有趣组件的snapcraft.yaml的概述:a)它将拥有多个应用程序; 通常,snap包含一个应用程序。b)它具有简单的后台服务,其他应用程序可以连接到该服务。 我们一起来看一下。 Snapcraft yaml 以下是snapcraft.yaml文件的内容: apps: borg: command: bin/borg daemon: simple restart-conditi […]

Learn snapcraft by example – multi-app client-server snap

Over the past few months, we published a number of articles showing how to snap desktop applications written in different languages – Rust, Java, C/C++, and others. In each one of these zero-to-hero guides, we went through a representative snapcraft.yaml file and highlighted the specific bits and pieces developers need to successfully bui […]

Snapcraft tricks: Improve release flexibility with pull and build overrides

Sometimes, software projects are simple – one architecture, one version, one release. But often, they can be complex, targeting multiple platforms, and with different versions at that. If you are packaging your apps as snaps, you might wonder about the optimal way to accommodate a multi-dimensional release matrix. One yaml to rule them al […]