Comment 74 for bug 1643706

Revision history for this message
private_lock (private-lock) wrote :

What makes this issue so frustrating is that you don't get helpful error messages. So if the snap sandbox denies access, it should at least step to the front and clearly announce, that it did so, instead of secretly failing and letting the application take the blame.

E.g. "Kompare":
$ p=/tmp; touch $p/{1,2}.txt && ls -l $p/{1,2}.txt && kompare $p/{1,2}.txt && rm $p/{1,2}.txt

Results in "The URL file:///tmp/1.txt does not exist in your System!"

YES it does exist - I just wrote the data there myself. It is readable and writeable by my user!

$ p=~/.cache; touch $p/{1,2}.txt && ls -l $p/{1,2}.txt && kompare $p/{1,2}.txt && rm $p/{1,2}.txt

Results in "The diff output cannot be read!"

WTF? I gave you 2 files, why do you complain only about one? Which one?

Where as I can use the file-chooser dialog to open the files one by one - only it cripples the path into something like: /run/user/1000/doc/f036519e/1.txt ... kompare even tries to be nice and remembers this for the next session, when it is guaranteed not to exist anymore.

Furthermore you can only guess by the filename, which folder they are coming from. But when it comes to comparing files, they often start as copies of each other and deviate over time, while the filename explicitly stays - only the crippled folders change ... well, now they change every time in this unhuman hex, that should really not be exposed to my eyes.

Also I better not imagine, what happens, when vlc opens a 10 GB movie - I hope, it doesn't require to duplicate the data on the hard-drive???

Back to our example: while the commandline parameters are given in the terminal, they get an asymmetric error message in the GUI and the terminal keeps perfectly silent. On the other hand, just touching any of the file-open dialogs will spam the terminal in the background with dozens of AccessDenied, even if the final operation succeeds after explicitly choosing the right files.

Up to now, I have no idea, why the .cache behaves differently ... so $HOME is somewhat OK, but don't try anything fishy with hidden folders???

Hidden files are OK though:
$ p=~/Downloads; touch $p/.{1,2}.txt && ls -al $p/.{1,2}.txt && kompare $p/.{1,2}.txt && rm $p/.{1,2}.txt

This tells me, they are equal without the need for a file-chooser. FINALLY!

$ snap version
snap 2.58
snapd 2.58
series 16
ubuntu 22.04
kernel 5.15.0-58-generic

$ snap list kompare
Name Version Revision Tracking Herausgeber Hinweise
kompare 22.08.2 71 latest/stable kde✓ -