Not possible to open .png file saved by Flameshot (Snappy Edition) app

Bug #1925361 reported by David Bakala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Undecided
Unassigned

Bug Description

After an attemt to open the .png file by a right button + "Open With Other Application, Pinta is not able to open the .png file and shows this error: Could not find a part of the path "/run/user/1000/-doc/by-app/snap.flameshot/e72e1ab3/-Byt_2_patro.png".

Details of the error:
System.IO.DirectoryNotFoundException: Could not find a part of the path "/run/user/1000/doc/by-app/snap.flameshot/e72e1ab3/Byt_2_patro.png".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <533173d24dae460899d2b10975534bb0>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <533173d24dae460899d2b10975534bb0>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <533173d24dae460899d2b10975534bb0>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
  at Pinta.Core.GdkPixbufFormat.Import (System.String fileName, Gtk.Window parent) [0x00001] in <2384e42676f8477c8d7fef8885667d1f>:0
  at Pinta.Core.WorkspaceManager.OpenFile (System.String file, Gtk.Window parent) [0x0003d] in <2384e42676f8477c8d7fef8885667d1f>:0

I have Ubuntu 20.04.2 LTS.

Version of Flameshot app: v0.9.0.rc2+git33.856e08a

I don't know if it helps, but Flameshot is not able to save the capture in a folder of my choice. If I pick a folder where I want to save the .png file, it doesn't save it there, but in its "e72e1ab3" folder. And if I want to change the folder in the settings, it somehow doesn't allow me.

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

Assuming they're both installed as snaps, you should contact Flameshot upstream to tell them that the xdg-desktop-portals are interfering with the save functionality, having just tried it myself it is legitimately impossible to save in the expected folder right now, even though it should be capable of saving in $HOME.

As for what can be done Pinta side, the Pinta snap is also heavily sandboxed and can't access arbitrary filesystem locations, including these private directories of other snaps. In Pinta 1.8, it'll be able to access arbitrary locations when you use the file > open dialogue in Pinta itself. Until then, the only thing I can recommend is to reinstall Pinta in dev mode, which disables a lot of the sandboxing (and also automatic updates).

> sudo snap install pinta --devmode

Dev mode doesn't make a snap act entirely like a classic application, so it still might not allow access to absolutely every location on the system, and if it doesn't have the desired effect then I'd have to suggest trying another package such as the PPA installation or the Flatpak (but the Flatpak is likely to have similar problems since it's sandboxed too).

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

Marking as fixed for Pinta 2.0, which supports the file chooser portal and addresses the issue mentioned in comment #2

Changed in pinta:
milestone: none → 2.0
status: New → Fix Committed
Changed in pinta:
status: Fix Committed → Fix Released
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.