Custom snap shows default X11 cursor

Hi,

I’m developing an up-to-date alacritty snap. It’s a classic snap and doesn’t seem to honour the cursor theme. It shows the default & ugly X11 cursor. The latest snapcraft.yml can be found here. Since it’s a classic snap, I think that it should have access to the system themes etc. Isn’t that the case? If not, probably snapcraft-desktop-helpers may have a fix for this but I’m not sure how I can leverage that without depending on GTK or QT etc.

Thanks!

The desktop-launch script created by snapcraft-desktop-helpers sets XCURSOR_PATH to a directory that probably doesn’t have any Xcursor themes installed to. So you are probably ending up with old fallback cursors.

The helper scripts (and the Snapcraft extensions that they evolved into) are designed for use with strict confined snaps where there would be no possibility of accessing system installed theme files. You might need to use something a bit more specialised if you’re building a classic snap.

1 Like

Maybe we can fix the scripts to be also suitable with classic confinement?

It’s not obvious what configuration changes done by desktop-launch are appropriate for classic snaps. The usual reason you’d need classic confinement is to run commands from the host system. Those environment changes are just as likely to cause those host system binaries to malfunction as they are to make the snap’s binaries function.

This would be particularly the case for a terminal emulator where pretty much anything could be a subprocess.

1 Like

I updated the wrapper script (that’s being executed inside the command-chain) to include below line and it seems to work. Thanks @jamesh!

export XCURSOR_PATH="/usr/share/icons"
1 Like