Snapping communitheme

I think that having a substitute (or more than one) with same powers could be good. If @merlijn-sebrechts agrees, I can do it.

3 Likes

I think that’s a good idea and I’m interested to take care of this, although it’s best to have multiple people with this power, I can’t guarantee that I have time every week to do this.

+1

3 Likes

So basically, the theme files are contained in the snap, and you tell Gnome to look for themes in that snap’s folder using XDG_DATA_DIR magic? Does snapd change XDG_DATA_DIR when the theme snap is installed?

If I understand correctly, this will only work on Ubuntu 18.04+, right? Other distros will need to install a package which adds the session, settings and dash-to-dock override, right? Or does the session also use the XDG_DATA_DIR magic?

How does the confinement work for this? Can anyone create a new theme and add it or do you need some blessing from the snapd folks? (a plug?) How does versioning work? Is there any way to make sure the theme and gnome version are compatible?

2 Likes

Exactly! snapd won’t be even invoked, it’s only used as a transport mecanism for that part. Basically, the session is driving XDG_DATA_DIR.

That’s all correct! + a little magic (herm, a symlink) for the cursor theme to work on X, as X is started before the session :slight_smile:

We don’t really use snapd as a confinement mechanism (nobody was able with any technology to confine yet an entire user session), so it’s only a delivery mechanism that enables people to select their level of “risk” (tracking edge or stable for instance), and auto-refresh. We take advantages of both. So, right now, this is limited to communitheme only (as you noted, there are some parts which are in the distro and can’t be pushed as part of the snap). For compatibility, there is the notion of tracks, and we’ll create a “bionic” track once we move to an uncompatible GNOME Shell and move people to it (however, there is no dependencies notions between snaps and debs). However, the bionic GNOME Shell version will stay forever compatible as part of our release process.

2 Likes

:clap: this :clap: is :clap: so :clap: cool! :clap:

So how come the session only shows up when the snap is installed?

2 Likes

Again, sorry for the slow reply! I would say only the Interface font (that’s the only one I change anyway).

1 Like

Magic ! (well, actually TryExec in the session file pointing to the helper in the snap! ;)). More on that in a blog post I plan to write early next week.

4 Likes

Awesome, desktop files are a lot more powerful than I imagined. :slight_smile:

Let me know if I can help with the blog post in any way :slight_smile:

3 Likes

Hey @didrocks, a quick snap based question: Seems the theme is able to work out of a snap soon, but what about the theming support for example LibreOffice Snap?

I read that the team is working on it (https://trello.com/c/2qvAB1yd/37-theme-support-for-snaps) and I just wonder, when this will be working - any ideas?

Thanks!

1 Like

Not really (this is currently done by the snap team itself) and I don’t have an idea of their priorities/timelines. But once implemented, I’ll make sure the communitheme snap works with it :slight_smile:

2 Likes

And here we go! The snap is now available for ubuntu 18.04 LTS users :slight_smile:
https://didrocks.fr/2018/04/10/welcome-to-the-ubuntu-bionic-age-new-wip-ubuntu-theme-as-a-snap/

(Known issue: you should note that GTK2 applications aren’t themed properly, we’ll work on this)

11 Likes

Seems the snap is working nicely - thanks a lot @didrocks and of course thanks to the whole team!

6 Likes

As mentioned on the blog post, there are autogenerated snap support for PR.
This enable users to try a branch work in progress before getting it merged to master.

I got a question today from @frederik-f why this wasn’t working for him on https://github.com/ubuntu/gnome-shell-communitheme/pull/104.
Just to be clear: for security reasons, the hidden token (snap store to push the snap and Github to comment on the PR) aren’t accessible for branches not being in the same repository than the destination target. This is a Travis CI feature.

What it means is that if you want to have automated generated snap before they hit master as part of the PR (as in https://github.com/ubuntu/communitheme-snap-helpers/pull/6), you need to have your source branch under the ubuntu repo instead of your own fork.
I’ve fixed the build script so that people using branches on their own fork don’t have CI failing. Their branches are still building a snap to ensure it works, but not uploaded to the store and thus, no comment appearing:

Here is an example:

Here are the set of branches that would need to be rebased on latest git master and moved under the ubuntu repo:

Note that if you intend to get it merged them soon without having snap previews from your branch, don’t bother :slight_smile: Just ensure that future branches follow this!

I just installed the snap theme on a fresh daily image, and default interface font is still 11 :open_mouth:

You didn’t answer to my question (I asked you twice in this topic) which is a prerequisite to the changes:

[quote=“didrocks, post:6, topic:4890”]
All fonts? (there are 4 fonts that people can generally change in Tweaks), or only Title fonts or anything else?[/quote]

@madsrh: I would need an answer quickly on this to make the upload in ubuntu now that beta freeze is lifted. :slight_smile:

Now that we are close to the release, if no answer by tomorrow, I won’t be able to push the change, I’m afraid :/. The best would be for you to open a launchpad bug describing the changes, that it won’t impact the default session, and what keys are changed.
Thanks!

1 Like

Sorry @didrocks, yes my reply was a little too late :tired_face:

It’s a little embarrassing, but I’m not sure if this is correct at all! Bug #1764974 “Change default interface font size in Community th...” : Bugs : ubuntu-settings package : Ubuntu

@madsrh: Sounds correct! (well, not the correct package, but I’ll retarget). Thanks!

Just to confirm: basically, you only want the interface font to be at 10, as I see it (second options in tweaks)? So, window titles, fixed font and documents stays at their previous defaults.

1 Like

@didrocks correct! and thanks :blush:

1 Like

And done! https://launchpad.net/ubuntu/+source/ubuntu-settings/18.04.5

1 Like

@c-lobrano & @merlijn-sebrechts: Ok, I have promoted current edge version (fixing gtk2 and electron apps) in the stable channel.

I’ll let you handle further regular promotion from edge to stable from now on :slight_smile:

Some quick instructions how to do it:

First time:

  • install snapcraft
  • ensure you are logged in via snapcraft login

Then, everytime you want to promote the currently tested snap

  • snap info communitheme to check which snap revision you are running on :slight_smile:
  • publish that revision to stable channel (and candidate/beta if anyone is using it) via: snapcraft release <your-tested-revision> stable,candidate,edge
  • you can rerun snap info to ensure everything went alright :slight_smile:

I think targetting at having one release a week (and maybe even communicating it on a dedicated thread) would be awesome! Most of people are relying on the stable channel from the first stats, so it’s quite important (and it seems this communitheme snap is getting popular, which is awesome even before 18.04 is released!) I’ll let you organize around this!

As usual, do not hesitate to ask if there is any issue :wink:

2 Likes