Pinta fails to open file paths that contain a "hidden" (begins with ".") folder

Bug #2066189 reported by Dan Sorak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Invalid
Undecided
Unassigned

Bug Description

System: Ubuntu 22.04 LTS
        Gnome 42.9
        GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
        Pinta 2.1.2

If I try to open a file from: /home/dan/.local/share/icons, pinta will fail with:

$ pinta ~/.local/share/icons/speaker.jpg
Gtk-Message: 10:38:29.576: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(pinta:44545): GdkPixbuf-CRITICAL **: 10:38:30.185: gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed

(pinta:44545): GdkPixbuf-CRITICAL **: 10:38:30.185: gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
Pinta: GLib.GException: Error opening file /home/dan/.local/share/icons/speaker.jpg: Permission denied
   at GLib.FileAdapter.Read(Cancellable cancellable)
   at Pinta.Core.GdkPixbufFormat.Import(IFile file, Window parent)
   at Pinta.Core.WorkspaceManager.OpenFile(IFile file, Window parent)

...despite the file being accessible with permissions 644 (-rw-r--r) and all path elements set to 755 (drwxr-xr-x).

If I move the file to ~/speaker.jpg, it opens successfully without the file open error:

$ pinta speaker.jpg
Gtk-Message: 10:49:29.051: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(pinta:52294): GdkPixbuf-CRITICAL **: 10:49:29.627: gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed

(pinta:52294): GdkPixbuf-CRITICAL **: 10:49:29.627: gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed

Tags: snap
Dan Sorak (dsorak)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Cameron White (cameronwhite91) wrote :

Are you using a snap or flatpak installation of Pinta? I suspect this might be a sandboxing issue..

Revision history for this message
James Carroll (james-carroll) wrote :

This definitely sounds like Snap sandboxing, all hidden files in the top level of $HOME are blocked to prevent leaking config/secrets, like .ssh for example.

You should be able to open the file regardless if you use the File > Open menu in Pinta itself.

Unfortunately there's no good workaround until future snap development work allows to make the file access management more user configurable.

Revision history for this message
Dan Sorak (dsorak) wrote : Re: [Bug 2066189] Re: Pinta fails to open file paths that contain a "hidden" (begins with ".") folder

Yes, I am using a snap install. Not a big fan of snap, so I'll just
uninstall that version and install and apt version. Thanks Cameron!

On Wed, May 22, 2024 at 10:30 AM James Carroll <email address hidden>
wrote:

> This definitely sounds like Snap sandboxing, all hidden files in the top
> level of $HOME are blocked to prevent leaking config/secrets, like .ssh
> for example.
>
> You should be able to open the file regardless if you use the File >
> Open menu in Pinta itself.
>
> Unfortunately there's no good workaround until future snap development
> work allows to make the file access management more user configurable.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2066189
>
> Title:
> Pinta fails to open file paths that contain a "hidden" (begins with
> ".") folder
>
> Status in Pinta:
> New
>
> Bug description:
> System: Ubuntu 22.04 LTS
> Gnome 42.9
> GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
> Pinta 2.1.2
>
> If I try to open a file from: /home/dan/.local/share/icons, pinta will
> fail with:
>
> $ pinta ~/.local/share/icons/speaker.jpg
> Gtk-Message: 10:38:29.576: Not loading module "atk-bridge": The
> functionality is provided by GTK natively. Please try to not load it.
>
> (pinta:44545): GdkPixbuf-CRITICAL **: 10:38:30.185:
> gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
>
> (pinta:44545): GdkPixbuf-CRITICAL **: 10:38:30.185:
> gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
> Pinta: GLib.GException: Error opening file
> /home/dan/.local/share/icons/speaker.jpg: Permission denied
> at GLib.FileAdapter.Read(Cancellable cancellable)
> at Pinta.Core.GdkPixbufFormat.Import(IFile file, Window parent)
> at Pinta.Core.WorkspaceManager.OpenFile(IFile file, Window parent)
>
> ...despite the file being accessible with permissions 644 (-rw-r--r)
> and all path elements set to 755 (drwxr-xr-x).
>
> If I move the file to ~/speaker.jpg, it opens successfully without the
> file open error:
>
> $ pinta speaker.jpg
> Gtk-Message: 10:49:29.051: Not loading module "atk-bridge": The
> functionality is provided by GTK natively. Please try to not load it.
>
> (pinta:52294): GdkPixbuf-CRITICAL **: 10:49:29.627:
> gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
>
> (pinta:52294): GdkPixbuf-CRITICAL **: 10:49:29.627:
> gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pinta/+bug/2066189/+subscriptions
>
>

--
Dan

Revision history for this message
Cameron White (cameronwhite91) wrote :

I'll close this since there isn't much that can be done on Pinta's end

tags: added: snap
removed: gnome ubuntu
Changed in pinta:
status: New → Invalid
Revision history for this message
James Carroll (james-carroll) wrote :

There's some work that's just landed in snapd's edge branches to show a system prompt that would allow the user to override the snaps access to $HOME. It'll probably be several months before it's enabled in stable releases by default, and I'm unsure if there's any OS requirements (E.G would it work with 24.04 or would it require 24.10?) - but this is something that's very much being actively looked into.

E.G: https://github.com/snapcore/snapd/commit/0ff642e82efc89780a3f81025566f13172da6512 and related commits.

Revision history for this message
Cameron White (cameronwhite91) wrote :

Great, thanks for the update!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.