Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting our team. We will be in touch shortly.Close

  1. Blog
  2. Article

Igor Ljubuncic
on 31 December 2020

Snaps and themes – on the path to seamless desktop integration


Alongside performance, theming is one of the primary concerns for desktop snap users. People expect applications bundled inside snaps to look and behave just like their counterparts shipped and packaged in the traditional way in their Linux distributions, and any discrepancy in this space can lead to a degraded user experience.

Over the years, we have invested a lot of focus in improving the theming integration, but recently, we picked up pace in this area, and we’d like to share a story of our ongoing and future efforts, and set the tone for 2021.

Automatic theme installation for snaps

This project is designed to simplify the usage of new themes in your desktop. In other words, whenever you install and apply a new theme in your system, this change will also propagate to your snaps. This is done by a background service, which will check if the associated theme already exists as a snap, and if not, offer the user the option to install it. With this service in place, you will experience a much tighter integration of snaps in the system, and you will avoid the scenarios where your snaps look different (incorrectly themed) compared to the traditional applications on your host.

Theme snaps

This has probably piqued your curiosity, so the next logical step is to discuss how Linux desktop themes can be packaged as snaps. We already have a nice example to share with you – the TraditionalHumanized theme, a GTK-based theme, available on GitLab.

The example includes the snapcraft.yaml file, which can be used as a recipe for pretty much any other theme. In this particular instance, the theme is designed for use with the MATE desktop, but you can expand it to suit whichever needs you have. It is also worth noting that by default, you will have access to a range of common themes, so that if you’re using standard or stock themes in your Linux desktop, you will most likely already have good integration of themes and snaps. Using the theme snaps, you can expand and complement the common set.


parts:
  theme:
    plugin: dump
    # downloaded from https://www.gnome-look.org/p/1309630/
    source: ./TraditionalHumanized.tar.gz
    Organize:
      gtk-*: share/themes/TraditionalHumanized/
    Stage:
      - share/themes/*/gtk-*
...

Desktop integration

The magic behind the scenes is part of the snapd desktop integration effort. When implemented, the code will provide a user session daemon, which acts as a bridge between the user’s session and snapd, and will be used, among other things, for automatic theme installations. At the moment, the code is work in progress and may yet change – but this is a great opportunity for you to join the effort and contribute! If you’re a theme developer, or you have clever ideas on how to potentially improve the snap look & feel, please submit your own PRs or issues so they can be reviewed and discussed.

Greedy plugs

Finally, the next step in the integration is to allow automatic connection of themes, and allow multiple snaps to connect to them. We aim to achieve this with the proposed greedy plugs. In the future, icon and sounds themes may also be included.

Summary

Seamless theming should make snaps even more fun to use. If you’re a theme developer, you may want to consider the improvements we are introducing in our tooling, and help bring even more art and variety to Linux users in an easy and consistent way. We also welcome feedback, so please join our forum for a discussion, on themes or any other topic.

See you in 2021.

Photo by russn_fckr on Unsplash.

Related posts


Holly Hall
15 January 2024

Managing software in complex network environments: the Snap Store Proxy

Internet of Things Article

As enterprises grapple with the evolving landscape of security threats, the need to safeguard internal networks from the broader internet is increasingly important. In environments with restricted internet access, it can be difficult to manage software updates in an easy, reliable way. When managing devices in the field, change management ...


Massimiliano Gori
16 September 2024

Announcing Authd: OIDC authentication for Ubuntu Desktop and Server

Ubuntu Article

Today we are announcing the general availability of Authd, a new authentication daemon for Ubuntu that allows direct integration with cloud-based identity providers for both Ubuntu Desktop and Server. Authd is available free of charge on Ubuntu 24.04 LTS. At launch, Authd supports Microsoft Entra ID (formerly Azure Active Directory) ident ...


Richard Ferreira
4 September 2024

Meet Canonical at Open Source Summit Europe 2024

AI Article

Join Canonical, the publisher of Ubuntu, as we attend the upcoming Open Source Summit Europe 2024 in Austria. Hosted by the Linux Foundation, this summit is the premier event for developers, technologists, and community leaders with a keen interest in the innovation that open source enables. Mark your calendars for September 16-18, 2024, ...