Snap package ignoring cursor theme

Today I finally found a real solution to this problem and just thought I’d share it with the internet. Hopefully some people find this useful and are able to apply this advice to whatever cursor theme they are using.

So currently I am using a cursor theme called “Bibata-Modern-Ice” which has no snap package in the store and my solution here basically goes over how to compile it into a snap, install on your system and configure your snap applications to actually use it.

For this example I’m using this git repo like a template. https://github.com/stoefelz/arcaurora-cursors-snap

  1. I cloned the repo with this command git clone https://github.com/stoefelz/arcaurora-cursors-snap

  2. I went here and downloaded “Bibata-Modern-Ice.tar.xz”

  3. Extracted the archive containing my cursor theme and verified that it’s directory structure is like so:

Bibata-Modern-Ice
├── cursors
│   ├── [...] (Lots of files with numbers & stuff)
├── cursor.theme
└── index.theme

  1. Recompressed the archive which was downloaded in step 2 into a zip archive. (I think this may be unnecessary)

  2. Moved into the repository directory in my terminal (cd arcaurora-cursors-snap) and also moved the zip file I made in the previous step to this same directory.

  3. Edited the file snap/snapcraft.yaml like so:

---
name: bibata-modern-ice-cursors
version: '1.0'
base: core22
license: GPL-3.0
grade: stable
confinement: strict
summary: Bibata Cursor Theme
description: |
  This snap contains the Bibata-Modern-Ice cursor theme
slots:
  icon-themes:
    interface: content
    source:
      read:
        - $SNAP/share/icons/Bibata-Modern-Ice
parts:
  cursors:
    plugin: dump
    source: ./Bibata-Modern-Ice.zip
    override-build: |
      snapcraftctl build
      mkdir -p $SNAPCRAFT_PART_INSTALL/share/icons
      mv -f $SNAPCRAFT_PART_INSTALL/Bibata-Modern-Ice $SNAPCRAFT_PART_INSTALL/share/icons/
    stage:
      - share/icons/Bibata-Modern-Ice
  1. Installed snapcraft using the command sudo snap install snapcraft

  2. Ran the command snapcraft inside the git repo directory

  3. I was prompted to allow the automatic installation of a snap called lxd during the process. I had to manually add my user to the lxd group which I did using sudo usermod -a -G lxd (your linux user here)

  4. After logging out of GNOME and then logging back in I moved back into the repo directory and reran the snapcraft command

  5. Finally, the snapcraft command exited successfully and I then found a file in my repo directory called bibata-modern-ice-cursors_1.0_amd64.snap which I installed using the command sudo snap install bibata-modern-ice-cursors_1.0_amd64.snap --dangerous

  6. I ran snap connections firefox command and noted the plug and slot for firefox:gtk-3-themes and firefox:icon-themes which had extra entries for me (from previous theme installation attempts).

  7. I disconnected the firefox:gtk-3-themes & firefox:icon-themes plugs using commands sudo snap disconnect firefox:gtk-3-themes and sudo snap disconnect firefox:icon-themes

  8. Reconnected the firefox gtk 3 themes plug using sudo snap connect firefox:gtk-3-themes gtk-common-themes:gtk-3-themes

  9. Connected the icon themes plug to my newly installed snap package with the command sudo snap connect firefox:icon-themes bibata-modern-ice-cursors:icon-themes

  10. Restarted the firefox snap app and observed that the Bibata modern ice cursor theme is actually being used after all this work.

To apply this theme to my other apps I basically repeated steps 12 - 16 but with the package name of the other app I wanted to change like discord for example. If you want to see a list of your packages in the terminal you can run snap list

Disclaimers: I’m not really much of a programmer and I don’t really know what I’m doing on a deep technical level. I think this solution won’t work if your theme for other like normal gtk apps isn’t set to exactly the same thing as what’s being used in the theme snap. For example my cursor theme in gnome-tweaks is set to “Bibata-Modern-Ice” and I installed the same exact files in the archive from step 2 into ~/.icons /usr/share/icons and .local/share/icons so if your doing this with a different cursor theme you might need to make sure you have it installed in those locations also and that everything lines up in the snapcraft.yaml file where I basically replaced all the references to arc aurora with the theme I wanted (Bibata modern ice).

2 Likes