Inkscape on Silverblue, a few caveat to keep in mind

Today at Flock, I did participate to the Badges Workshop. The badges are done in SVG, using Inkscape. And so, using my Silverblue laptop, I decided to test the inkscape from flathub. And I stumbled on 2 issues that we might need to keep in mind if we want the system be usable by others.

1st one is that inskape has the concept of color palette. Seems that to add a palette, you need to copy something either in /usr/share, or somewhere in ~/.config/ . /usr/share seems to a no go for flatpak, but I am not sure. Other location is in home directory, but at that time, I didn’t knew about the ~/.var/ location, and ~/.config is empty.

So I am not sure how we can get this kind of issue fixed. Cause basically, all documentations out there are wrong. The real solution is to get things done inside inskape, and patch upstream, but that’s maybe a large feature.

2nd one is that there is a setting to autosave the documents, but default setting is in /tmp. While that’s a sensible location for a non flatpaked application, /tmp can’t be shared and I suspect in tmpfs for flatpak. I didn’t look at the code, but if it doesn’t use $TMPDIR, then it mean the default configuration of a feature to recover from crash will in fact not work, and result in a rather poor experience for our users.

While that’s not a package we maintain, this kind of issue would reflect badly on Silverblue, and I guess we need to find something to address them. I was about to look at inkscape code, but gitlab.com is down, because they are migrating to GCP.

1 Like

So, i found that by default, it get to Glib::get_tmp_dir() src/ui/dialog/inkscape-preferences.cpp · master · Inkscape / inkscape · GitLab

I am not exactly sure if that’s the right thing to do, since there is some security implications in keeping /tmp as a default choice (as the name is likely predictable and so I can see how 1 user could block another from autosaving, since there is no uid check on the file and likely not being hardened against user doing all kind of weird things). But I do not know where it should go. I would guess the cache directory ( g_get_user_cache_dir ) might be better, do folks here have a opinion ?

1 Like

I do think XDG_CACHE_DIR might make more sense for autosaving.