Autoconnect needed for upcoming Inkscape snaps

Updating the Inkscape snap to use some modern snap features. We’ll need some auto-connects or users will get errors. Here’s the MR.


For the purposes of documentation to ease the @reviewers’ job, it looks like you’re requesting the following two access and automatic connections (please correct if I’m wrong):

    interface: personal-files
    write: [ $HOME/.config/inkscape ]
    interface: personal-files
    read: [ $HOME/.local/share/fonts ]
1 Like

Thanks @lucyllewy, yes that is much easier (also @ted, I granted use of the well-known DBus name, org.inkscape.Inkscape, just now).

Note that the desktop, unity7 and x11 interfaces already allows read access to $HOME/.local/share/fonts. In the commit you provided, you seem to be plugging unity7 still, so I think this can be dropped from your snap.yaml?

Inkscape is the clear owner of $HOME/.config/inkscape, but the personal-files interface is typically used in this manner for read-only access so that a snap may import the data from the co-installed distro package/local install into ~/snap/inkscape/current (ie, what $HOME is set to at runtime). How does inkscape handle forward and backward compatibility for files in ~/.config/inkscape? Eg, consider if inkscape from a distribution package manager is installed and the snap. Can both installs writing to ~/.config/inkscape break one or the other?

As an aside, you mentioned that the thrust of the upstream MR was to use modern snap features. I suggest you update your plugs to include at least desktop, x11 and wayland, but probably also desktop-legacy for accessibility and input methods. You can leave unity7, but these other interfaces should cover things for you going forward (we created them to be DE-agnostic and they will receive the majority of improvements, whereas the unity7 interface is mostly in maintenance mode).

Wow, cool! Did not know that. I’ve messaged the desktop folks about adding the font directory to the fontconfig settings that are generated as part of those. Then everyone using the desktop helpers should be able to get user installed fonts. I’ll drop it from the Inkscape snap.

Yes, we can handle that. The preferences are XML file that we keep the full parsed version of and only adjust keys as needed so it can be shared between versions. The other stuff in the config directory (palettes, fonts, etc.) are version independent. The reason to not use the snap directory is that there is a large amount of documentation (much of which we don’t control) that uses the configuration directory in the home folder. We’d like to remain consistent with that.

The problem with dropping unity7 was the menus. It seems on 16.04 (which I’m still running on a machine) the menus get swallowed because the menu helper can see the name on DBus, but then can’t access it without the unity7 interface. I expect to drop it when 16.04 desktop becomes EOL.

+1 from me for personal-files for inkscape for inkscape-config - I assume user-fonts is not needed?

Correct, and it has been removed from the currently uploaded package.

Thanks @ted. One last thing. To remain consistent with interface names we’ve granted elsewhere, please adjust the snap to use:

    interface: personal-files
    write: [ $HOME/.config/inkscape ]

(we have this pattern so a user can more easily understand what snap [dis]connect inkscape:dot-config-inkscape will do)

+1 for use of and auto-connect of personal-files with write for $HOME/.config/inkscape using the dot-config-inkscape interface reference.

It is merged. Take a bit to get through all the Gitlab/LP/ machinery.

1 Like

We are at 5 days since the request and Inkscape is trying to cut a release candidate. I’m going to expedite the vote. @reviewers - if you haven’t vote and disagree with the vote, please comment and we can retally.

2 votes for use of and auto-connect of personal-files with write for $HOME/.config/inkscape using the dot-config-inkscape interface reference. Granting. This is now live.