Score:8

Snap version of gimp not opening images in root folder

in flag

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 avatar
pl flag
You can try Krita as an close alternative.
Ezzeldien Rashad avatar
in flag
@Rishon_JR Thank you, but I prefer to keep with gimp. Any suggestions to fix this problem?
Rishon JR avatar
pl flag
Try `sudo gimp` and open the file.
Rishon JR avatar
pl flag
Or you can switch to the apt version of GIMP.
Ezzeldien Rashad avatar
in flag
@Rishon_JR After switching to the apt version, it works. Can you please explain me why the snap version doesn't work? You can also write it as an answer.
FedKad avatar
cn flag
Does this answer your question? [How to give snaps access to /somedir](https://askubuntu.com/questions/1033344/how-to-give-snaps-access-to-somedir)
Rishon JR avatar
pl flag
It doesn't really help that much, and it's not a duplicate either @FedKad.
Score:17
pl flag

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.

Score:9
ve flag

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.

cn flag
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)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.