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 us. A member of our team 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 ...


Luci Stanescu
28 October 2024

Imagining the future of Cybersecurity

Ubuntu Security

October 2024 marks the 20th anniversary of Ubuntu. The cybersecurity landscape has significantly shifted since 2004. If you have been following the Ubuntu Security Team’s special three-part series podcast that we put out to mark Cybersecurity Awareness Month, you will have listened to us talk about significant moments that have shaped the ...


Canonical
10 October 2024

Canonical Releases Ubuntu 24.10 Oracular Oriole

Cloud and server Article

The latest release of Ubuntu delivers a cutting edge kernel and enhanced desktop security. 10 October 2024 Today Canonical announced the release of Ubuntu 24.10, codenamed “Oracular Oriole,” available to download and install from ubuntu.com/download. Ubuntu 24.10 delivers the latest kernel, toolchains and GNOME 47 desktop environment alon ...