You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Electron uses old and deprecated trash implementation that is not available on recent gvfs versions. #15011
On Linux, with distributions that ship gvfs >= 1.37.2, the builtin trash implementation does not work.
Rather than moving files to the trash, a popup appears warning that Electron "failed to delete using the trash. Do you want to permanently delete instead?"
The root of this issue is that the trash implementation runs a subprocess with a given $ELECTRON_TRASH command that handles the actual trash implementation. Electron supports several different trash implementations, via an undocumented environment variable, but for the use case of the average person, it will either use kioclient move on KDE desktops (which works), or gvfs-trash everywhere else.
The problem is that since gvfs 1.31.1, released in October 2016, the gvfs-trash command was replaced with a shell script that printed the following error message to stderr:
This tool has been deprecated, use 'gio trash' instead.
See 'gio help' for more info.
Then executed gio trash as a compatibility shim.
In the two years since then, the gvfs project decided they've given people enough time to migrate onto the supported tool, and they removed the compatibility shims in 1.37.2 (released in May).
Downstream distributions are now beginning to provide versions of gvfs which do not have this compatibility shim. As a result, electron cannot find it and thinks there is no functional trash implementation for it to use.
Note also that in #9518 support was added for the $ELECTRON_TRASH undocumented environment variable to be set to "gio" and thereby use the correct, modern trash implementation. However, this is obviously not very good UX at all and Electron remains broken by default.
Please switch the default implementation to use gio.
Reacted by Charles Gagnon, Oleksii Lozoviahin, Alexander Popov, Emrecan BATI, Cédric, Deuxis and ENPark
Activity
codebytere commentedon Oct 25, 2018
I'll get a PR up for this today!
pzmarzly commentedon Oct 28, 2018
Shouldn't it also get backported to 2-0-x, as it is also affected (Atom seems to be using that branch)?