Snapping communitheme

Hello communitheme team! :wink:

As told on https://community.ubuntu.com/t/cursor-theme-discussion/3870/55, I’m getting good progress on the snap support for communitheme!

I needed to add support for this to the distro itself. It includes in particular some patches for GNOME Shell (proposed upstream as well): https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/70. I uploaded this in ubuntu this morning (https://launchpad.net/ubuntu/+source/gnome-shell/3.28.0-0ubuntu2).

I also added another session name to differentiate from the ppa. There has been some workarounds needed for cursor icon theme and dash to dock style override. As I already stated on another topic about it, I needed to push an empty file with our theme name so that we can override the Dash to Dock theme from our theme directly (the !important trick mentioned in the theme is wrong btw, and doesn’t work. Is there anyone volunteering to clean that up?).
Once the UIF exception is accepted due to new translation strings entering the distribution, I’ll upload both components (https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1760049/).
Note that we expect people to remove the ppa version and switch to the snap version.

Finally, the settings override has also to be in distro, to set the correct theme names and general parameters. This will be hard to change once in (and can’t be piloted from the snap). This is why I’m asking for feedbacks.
Here are the keys:

#############################################
# communitheme specific session for testers #
#############################################

[org.gnome.desktop.interface:communitheme]
cursor-theme = "communitheme"
icon-theme = "Suru"
gtk-theme = "Communitheme"

[org.gnome.desktop.sound:communitheme]
theme-name = "communitheme"
input-feedback-sound = true

Am I forgetting anything? IIRC, there has been discussion about default cursor size, what was the outcome and what should be chosen?

Finally, I suggest we keep the name “communitheme” for the WIP name, and then, pick a real name for 18.10. Agreed?

If you have any questions or anything else coming up to your mind, do not hesitate to ask :wink:

11 Likes

Hi Didrocks,

Thank you for this work! About feedbacks, on theme/snap side what are the changes to support these keys?

I’m OK wit keeping communitheme name for WIP, then it’ll be funny to choose a new name :smiley:

Cleaning up the “important!” keyword in my backlog.

1 Like

One more thing. Do you think it’s possible to set the “center new windows” to TRUE as we might do for sound?

vvvvv

Actually, that’s exactly what I was asking for, what else do need to change by default so that I upload the package with those settings :slight_smile:
Ok, noting to setting “center new windows” to true for this session. IIRC, there was also a discussion about default font size, what was decided in the end, any other keys to change (the ppa schema doesn’t contain a change for font size)?

1 Like

Size 10! But you’re right, no change has been made yet - can you fix that too @didrocks?

I don’t mind at all - please do.

I didn’t see the default cursor size discussion. Was this only for the busy spinner or for the pointer as well? :thinking:
I’ve changed the sizes of idea 2+3 as requested.

It works fine for testing without, so I got lazy - sorry. Sure, I’ll fix that :+1: There’s also so more house cleaning to do :construction_worker_man:

I would suggest that we only package one cursor style ( Communitheme_12 if you prefer) and remove the other designs. Is that still the plan?

EDIT: BTW I not really 100% satisfied with any of the designs yet :unamused:

2 Likes

All fonts? (there are 4 fonts that people can generally change in Tweaks), or only Title fonts or anything else?

Oh correct, that was that one! So nothing to do on my side :slight_smile:

That’s possible, I thought about installing them all and use a symlink as a pointer, but you’re correct, as you can’t load other from the snaps (as it’s loaded by X, before setting magic env variables) , let’s only ship one. We can then change it anymore for that part anyway :slight_smile:

[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:

So, the process I’m envisioning is that any new commits upload a snap to the store in the edge channel (people who want to track the latest would be able to get thus the latest of latest in just minutes!). Then, after some manual check and release management, someone (or maybe some people would be responsible of promoting it to the stable channel (like once a week?) so that most of people are using the safe and checked channel. I was thinking about giving those powers to @merlijn-sebrechts (are you interested?), but others can step in too and multiple people can have those rights, if think you want to do it. I’ll publish guidelines on how to do that, it’s pretty easy. :slight_smile:

5 Likes

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!