8

I have gimp 2.10.30 on Ubuntu 22.04. Whenever I try to open an image outside my home folder it says Error opening directory '<directory>': permission denied.
When I right-click on the image and choose open with gimp, it says: Opening <image path> failed: Could not open <image path> for reading: No such file or directory. How can I solve this?

Rishon_JR
  • 1,013

2 Answers2

17

I wouldn't go for using the snap version of GIMP. why? Well for a few reasons...

  • Snap is just janky and still has many compatibility issues.
  • It takes extra space and often most of the storage taken is a duplicate of other apt packages(i.e not needed).
  • It is extremely buggy compared to apt(As far as I have used it)
  • Snap works on the concept of containers (Think of them as tiny VMs for each app)
  • Due to this, many issues are present like the one you are facing.

I would recommend switching to the apt version of GIMP.

Rishon_JR
  • 1,013
9

This is by design. Snap uses confinement to limit what applications can do. The idea is roughly similar to the way mobile apps don't have full access to your phone but have to ask for certain permissions. For example, snaps aren't allowed to read some system files for security/privacy reasons.

Snap uses interfaces to control what resources a snap is and isn't allowed to access, of which there is a long list.

One useful connection is removable-media which automatically allows access to USB storage etc. For that you might do:

sudo snap connect gimp:removable-media

Or there is a GUI in Ubuntu's version of GNOME settings.

I'm not sure if there is a way to give access to an arbitrary directory though. The How to give snaps access to /somedir question has an answer from one of the developers which suggests not, although that was from 2018.

  • 2
    Last I checked there was no way even to grant snaps access to /tmp, which would be a real pain for GIMP if you ever use it for editing screenshots. (/tmp/ is where I tend to use pdftk, and trying to install pdftk via apt gives you the snap, so I've been caught out a couple of times) – Chris H Mar 08 '23 at 09:48