No support for icons and themes snaps

Bug #1582784 reported by fcole90
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

There's currently no support for windows and icons themes to be shipped as a snap package.

This is because it would require access to hidden user's folders or to /usr/share folders, both of which are not available under confinement. An idea could be to place the theme in the snap package folder and copy/symlink it to the user hidden folder on user's demand (a command like 'enable') to make the copy.

Symlinking could be have the advantage that would not require the user to bother copying the theme again to the theme folders, but I'm not sure it's possible to symlink to the snap package

The access could be provided through an interface that gives rw access to the .icons and .theme folders of the user (allowing to create them if they do not exist). The interface should avoid that the the snap could read other user's files outside the mentioned folders.

fcole90 (fcole90)
tags: added: interface snapd-
tags: added: snapd-interface
removed: interface snapd-
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hi

Can you explain a little more how themes and icons would be used?

Changed in snappy:
status: New → Incomplete
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

One thing I can think of is the content sharing interface but to actually use it here we'd have to have some more information. I suspect the "theme and icon" concept is too generic and we'll end up with *specific* technology-based interface instead (e.g. a GTK theme interface) but I could be wrong.

Revision history for this message
fcole90 (fcole90) wrote :

Ideally the themes and icons should be found in the .icons or .theme folders at the end of the installation or anyway in a place where a theme chooser like unity-tweak-tool could find them.

As there's currently no post-install step to move the files to the mentioned folders, I think that for the moment the user could enable the theme with a command and set it with another (or using his/her preferred theme chooser).

I created a snap package of an icon theme which uses these concepts:
https://github.com/fcole90/ubuntukylin-icon-theme-snap

It currently works only in devmode.

An additional drawback of the set/enable solution based on copying is that updating the snap package would require to enable the icon/theme again. Probably linking would be a better solution, but symlinking from ~ to files in snap/ results in broken links, maybe due to confinement.

fcole90 (fcole90)
Changed in snappy:
status: Incomplete → Confirmed
Revision history for this message
fcole90 (fcole90) wrote :

As I added more details to the bug, can we mark this as confirmed?

Revision history for this message
Jasem Mutlaq (mutlaqja) wrote :

I faced this problem while making a snap package for KStars. I have breeze-icon-theme installed in the integration step:

 integration:
    plugin: nil
    stage-packages:
      - breeze-icon-theme
      - ttf-ubuntu-font-family
    snap:
      - usr/share
      - -usr/share/doc
      - -usr/share/icons/breeze-dark

but KStars cannot load the icons, even in devmode. This is what I have in qt5-launch:

export DESKTOP_SESSION=ubuntu
export XDG_SESSION_DESKTOP=ubuntu
export XDG_CURRENT_DESKTOP=kde
export QT_QPA_PLATFORMTHEME=kde
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb

I'm not sure how to fix this or if this is a limitation of snappy

Revision history for this message
fcole90 (fcole90) wrote :

mutlaqja, I think the problem of yours is a different one, as the bug reported here is for packaging icon-themes or gtk-themes by themselves, to make them available to the user. Try to contact the snapcraft mailing list to have support on your problem and don't miss Tuesday's snapcraft meeting ;)

tags: added: snap-desktop-issue
Michael Vogt (mvo)
Changed in snappy:
importance: Undecided → Medium
status: Confirmed → Triaged
Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.