[go: up one dir, main page]

Some extensions doesn't work in Ubuntu snap

I have come across two issues using extensions in Inkscape 0.92.3 on Ubuntu. I'd like to bring them up here so that they're on our collective radar for the future.

(0) Background:

With Inkscape installed as a Snap ( https://snapcraft.io ) package on linux -- sudo snap install inkscape, it is a fixed package that cannot be edited.

Third-party extensions can still be added, by adding files to the "User extensions" directory listed at Edit > Preferences > System.

This directory is typically something like /home/USERNAME/snap/inkscape/4274/extensions. (My impression is that this path cannot be edited.)

(1) Python path should be provided to external extensions.

Extensions added to the User extensions directory do not have access to the other files in the Inkscape extensions directory such as inkex.py.

Adding third party extensions can expect to result in: ImportError: No module named inkex

(2) Snap confinement prevents access to external devices.

Default installation via Snap provides a security wrapper called "confinement" ( https://snapcraft.io/blog/demystifying-snap-confinement ) that prevents access outside of the user's home directory.

This is, in general, a great idea. But it also prevents Inkscape from having access to external devices. This can prevent, for example:

  • Inkscape from printing

  • Third-party extensions from connecting to external devices (e.g., EggBot, AxiDraw, etc).

  • The built-in Export>Plot extension from connecting to plotters. (Presumably; I do not have the right kind of plotter to verify that this is broken.)

A workaround, which removes this restriction, is to install Inkscape without confinement, by using sudo snap install --classic inkscape. However, this is a work around around reasonable security process, and isn't ideal.

The Snap documentation notes that developers may create certain "holes" in the confinement for allowed activities. Adding access for certain types of devices (printers, perhaps raw-usb, etc) might alleviate these difficulties, and prevent users from wholesale disabling the snap confinement.