Closed twelho closed 5 months ago
I ran the Flatpak with --verbose --log-level debug
and got the following output:
[18:0831/224625.607184:INFO:CONSOLE(627)] "%c ERR color: #f33 Failed to move 'test.txt' to the trash: Unknown (FileSystemError): Failed to move 'test.txt' to the trash
at n.create (/app/share/codium/resources/app/out/vs/code/electron-main/main.js:37:4518)
at i (/app/share/codium/resources/app/out/vs/code/electron-main/main.js:37:4650)
at m.delete (/app/share/codium/resources/app/out/vs/code/electron-main/main.js:42:55612)", source: vscode-file://vscode-app/app/share/codium/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
@twelho, sorry for the delay! This persists in the latest version?
Yes, the issue persists in the latest build:
Version: 1.83.1
Release: 23285
Commit: 36d13de33ac0d6c684f10f99cff352e2f58228b3
Date: 2023-10-12T18:26:29.496Z
Electron: 25.8.4
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
@twelho hey, maybe you could use flatseal to reset all the permissions for codium, I was testing this and all de files that I delete goes to the trash can.
It likely works for you as the Flatpak uses --filesystem=host
by default, which I have disabled globally due to it being unsafe. Ideally Flatpak'ed applications should use the trash portal for this. In the meantime, I tried forwarding xdg-data/Trash
and ~/.local/share/Trash
to the Flatpak, but neither seems to do the trick.
@twelho, I try with this permissions
and then within the codium file explorer remove a file and that file goes to the trash as espected
I tested this on F39 silverblue
Hmm, I'm on Fedora Kinoite 38. With this setup it still doesn't work:
$ flatpak override --user --show com.vscodium.codium
[Context]
filesystems=~/.local/share/Trash;xdg-data/Trash
$ flatpak override --user --show
[Context]
filesystems=!host
If you run flatpak enter com.vscodium.codium bash
and then in the Flatpak ls -la ~/.local/share/Trash
, is the directory present? For me it isn't.
If you run
flatpak enter com.vscodium.codium bash
and then in the Flatpakls -la ~/.local/share/Trash
, is the directory present? For me it isn't.
yes, indeed
That's an oddity on my end then. What does env | grep XDG_DATA
show for you?
Actually, none of the overrides I try work for VS Codium. Even if I set --filesystem=home
, the home directory is still empty inside the Flatpak, even after flatpak kill com.vscodium.codium
. Will take a closer look at this in the coming days, as this definitely works for other Flatpaks.
Maybe you can try to uninstall vscodium and use flatsweep to clean all, then install it again?
Tried that, didn't help. The home directory inside the Flatpak is still empty, apart from .local/share/flatpak
, which is just an empty directory.
@twelho Can you try this?
flatpak override --user --reset com.vscodium.codium
flatpak permission-reset --user com.vscodium.codium
Because I test this on a series vms (ubuntu 22.04, debian 12, fedora silverblue 38/39) and works as expected.
@twelho I tested this today and at least on Fedora Silverblue 39 it's working as expected, Can you confirm if it is working?
@twelho I'll close this, if you found any other problem, please don't hesitate and open a new issue.
Deleting a file and selecting "Move to Trash" shows this warning:
I've tried forwarding
xdg-data/Trash
to the Flatpak to no avail. Searching for this issue results leads to https://github.com/flatpak/xdg-desktop-portal/issues/114, but the workaround of--talk-name=org.gtk.vfs --talk-name=org.gtk.vfs.*
doesn't seem to work either.