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 }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
@rsese
Same here. The issue appeared after last arch update
gio is installed and works like a charm
Files are placed on the same partition, where the atom is
It seems that gvfs updates and dropped gvfs-trash, instead we should use gio trash now?
Temp workaround is to create a script as a warpper:
sudo vim /usr/bin/gvfs-trash
Fill it with content:
#!/bin/bash
# GVFS updated and dropped gvfs-trash to gio, but Atom didn't update.
/usr/bin/gio trash "$@"
and then:
sudo chmod +x /usr/bin/gvfs-trash
Reacted by VVhitehead, Ernesto Alonso Pestaña Jiménez, Rohit Agarwal, Casper van Elteren, Kevin, Alexander Popov, Ashley Williamson, Yash, Kaylee, Bartosz Sekula and 33 more
Reacted by Leonardo Matos, Germán Castro Montes, Tomasz Durda, Kebert Xela, Um Nontasuwan, Neil Macneale V, saltymouse, Aluisio Amaral, Kyrylo Aksonenko, Bruno Bottazzini and 6 more
Reacted by Tomasz Durda, Um Nontasuwan, Dennis Ogiermann, Sion Morris, Bruno Bottazzini, Nils Petzäll, Christiane Okamoto, Danilo Hadži-Pešić, Carlos Fagiani Junior, devops724 and 5 more
Reacted by Tom Oliveri, Danilo Hadži-Pešić and laknhan
It seems that gvfs updates and dropped gvfs-trash, instead we should use gio trash now?
Temp workaround is to create a script as a warpper:
sudo vim /usr/bin/gvfs-trash
#!/bin/bash
# GVFS updated and dropped gvfs-trash to gio, but Atom didn't update.
/usr/bin/gio trash "$@"
sudo chmod +x /usr/bin/gvfs-trash
perhaps this is a slight improvement and a little more copy pasta friendly:
echo '#!/usr/bin/env bash
# GVFS updated and dropped gvfs-trash to gio, but Atom didnt update.
# https://github.com/atom/tree-view/issues/1237
/usr/bin/gio trash "$@"
' | sudo tee /usr/local/bin/gvfs-trash && sudo chmod +x /usr/local/bin/gvfs-trash
Shouldn't this be closed? Correctly setting an environment variable fixes it completely. Moreover, if you wanted this to be the default behavior, for the user disliking direct manipulation of the environment, it's an upstream issue in any case.
I don't think requiring users to set env vars so this functionality works on common operating systems is reasonable. If this extension is capable of returning an error when the current default value doesn't work, it should also be capable of attempting to set the env var suggested here automatically as a fallback. Additionally, the gvfs-trash package has clearly been deprecated in favour of gio, so realistically this extension should be updated to use the new de facto, otherwise Linux users will all start seeing this feature break as they upgrade their distros to newer versions using gio instead of gvfs-trash
Reacted by Mitch, twifty, FreeRoss, surferwat and BackEnv
I'm having this issue since Atom 1.39.0, however it's the other way around for me.
Unfortunately I'm also on a Ubuntu 16.04 based distribution and can't install the necessary glib2.0 version which contains gio.
So for those of us who have this issues that way around, you can also use the env variable to use gvfs-trash again: ELECTRON_TRASH=gvfs-trash atom
Reacted by José Raddaoui Marín, Chris Woodhams, Zac Witte, Adi Prasetyo, Oleg Molchanov, tranbarsjuice, Pierpaolo Pantone, Vilian Ivantchev, Ryan Szeto, jhalag and 1 more
Reacted by Chris Woodhams, Oleg Molchanov, Ryan Szeto, jhalag, Aldo Bassanini and Afonso Lima
Same issue. Since the recent atom upgrade running on ubuntu 16.04 it complains about missing gvfs-trash, even though the file does in fact exist. I used the ELECTRON_TRASH=gvfs-trash atom trick to fix it, but this feels like something electron needs to handle automatically. Can't expect people to research this and add the hack to their environment.
Reacted by Andrii Zadaianchuk, Ahmed Ali, J. Daniel Espinosa Rodriguez, epyx25, Zhukov Roman, Pierpaolo Pantone, Vilian Ivantchev, Ryan Szeto and jhalag
I have noted all the comments above (which have been apt) and particularly tried/noted the ones detailed below:
It seems that gvfs updates and dropped gvfs-trash, instead we should use gio trash now?
Temp workaround is to create a script as a warpper:
sudo vim /usr/bin/gvfs-trash
Fill it with content:
#!/bin/bash
# GVFS updated and dropped gvfs-trash to gio, but Atom didn't update.
/usr/bin/gio trash "$@"
and then:
sudo chmod +x /usr/bin/gvfs-trash
I don't think requiring users to set env vars so this functionality works on common operating systems is reasonable. If this extension is capable of returning an error when the current default value doesn't work, it should also be capable of attempting to set the env var suggested here automatically as a fallback. Additionally, the gvfs-trash package has clearly been deprecated in favour of gio, so realistically this extension should be updated to use the new de facto, otherwise Linux users will all start seeing this feature break as they upgrade their distros to newer versions using gio instead of gvfs-trash
sudo chown -R "$USER" ~/.local/share/Trash
This issue has been surprisingly difficult to resolve.
Is there anything else I can try?
There is an other issue that hasn't been addressed here, if you are working from the default apache installation, /var/www/html/, then gvfs-trash will complain:
>gvfs-trash /var/www/html/wp/wp-content/themes/twentyfifteen/js/test.js
This tool has been deprecated, use 'gio trash' instead.
See 'gio help trash' for more info.
gio: file:///var/www/html/wp/wp-content/themes/twentyfifteen/js/test.js: Trashing on system internal mounts is not supported
NOTE: Trashing on system internal mounts is not supported
so I created a new script for /usr/bin/gvfs-trash
#!/bin/bash
# GVFS updated and dropped gvfs-trash to gio, but Atom didn't update.
/bin/rm -f "$@"
Probably not the best idea, but given that gvfs-trash is deprecated, I am assuming it should be ok.
Now it works, along with setting the env,
I had the same issue and none of the solutions above had worked.
If you are like me that has your projects under /var/www/ atom will not be able to delete, aparently the delete action does not works under the filesystem mount, so I manage it doing the following:
Created a folder www under my user, moved the files there, and then created a sysmlink from /var/www/ to my home mounted
When the files are on the ~/www I am able to delete correctly. Hope it helps
Activity
fmujakitz commentedon Jun 7, 2018
Had the same issue. Fixed by setting env var for
ELECTRON_TRASH=gio.lefuturiste commentedon Jun 26, 2018
Same issue on antergos archlinux
How I can set the env var forever ? What is the command @fmujakitz ?
I have the env variables :
but always the same problem
wyqydsyq commentedon Jun 27, 2018
If you want to persist an env var you can add it to your shell's initialization script e.g. .bashrc
lefuturiste commentedon Jun 28, 2018
Don't work also
rsese commentedon Jun 28, 2018
@lefuturiste does
gio trashwork ok from the command line?lefuturiste commentedon Jun 29, 2018
work well
rsese commentedon Jul 3, 2018
@lefuturiste what version of Atom are you running (
atom -v)?@wyqydsyq do you have
gioinstalled on your system? If so, does settingELECTRON_TRASHwork for you?lefuturiste commentedon Jul 4, 2018
@rsese
Atom : 1.28.0
Electron: 2.0.3
Chrome : 61.0.3163.100
Node : 8.9.3
Dzordzu commentedon Sep 21, 2018
@rsese
Same here. The issue appeared after last arch update
gio is installed and works like a charm
Files are placed on the same partition, where the atom is
Atom : 1.30.0
Electron: 2.0.9
Chrome : 61.0.3163.100
Node : 8.9.3
AlynxZhou commentedon Sep 23, 2018
It seems that gvfs updates and dropped gvfs-trash, instead we should use gio trash now?
Temp workaround is to create a script as a warpper:
Fill it with content:
and then:
pzmarzly commentedon Oct 28, 2018
This is an Electron issue: electron/electron#15011
kebertxela commentedon Oct 30, 2018
perhaps this is a slight improvement and a little more copy pasta friendly:
growlnx commentedon Nov 18, 2018
I had the same problem in my MANJARO, this worked for me too
vmvwebworks commentedon Jan 8, 2019
someone checked this? https://askubuntu.com/questions/288513/cant-move-files-to-the-trash
c-benko commentedon Mar 29, 2019
@vmvwebworks this solution worked for me. If atom won't let you throw things in the trash, it might be a permission issues.
I used
and now there is no issue.
memeplex commentedon May 14, 2019
Shouldn't this be closed? Correctly setting an environment variable fixes it completely. Moreover, if you wanted this to be the default behavior, for the user disliking direct manipulation of the environment, it's an upstream issue in any case.
wyqydsyq commentedon May 17, 2019
I don't think requiring users to set env vars so this functionality works on common operating systems is reasonable. If this extension is capable of returning an error when the current default value doesn't work, it should also be capable of attempting to set the env var suggested here automatically as a fallback. Additionally, the
gvfs-trashpackage has clearly been deprecated in favour ofgio, so realistically this extension should be updated to use the new de facto, otherwise Linux users will all start seeing this feature break as they upgrade their distros to newer versions usinggioinstead ofgvfs-trashSongworks commentedon Jul 26, 2019
I'm having this issue since Atom 1.39.0, however it's the other way around for me.
Unfortunately I'm also on a Ubuntu 16.04 based distribution and can't install the necessary glib2.0 version which contains
gio.So for those of us who have this issues that way around, you can also use the env variable to use
gvfs-trashagain:ELECTRON_TRASH=gvfs-trash atomvilian commentedon Aug 2, 2019
ELECTRON_TRASH=gvfs-trash atomworked for me on ubuntu 16 andAtom : 1.39.1
Electron: 3.1.10
Chrome : 66.0.3359.181
Node : 10.2.0
What would be a more long-term solution? (The other solutions did not work)
zacwitte commentedon Aug 23, 2019
Same issue. Since the recent atom upgrade running on ubuntu 16.04 it complains about missing gvfs-trash, even though the file does in fact exist. I used the
ELECTRON_TRASH=gvfs-trash atomtrick to fix it, but this feels like something electron needs to handle automatically. Can't expect people to research this and add the hack to their environment.dotnetspec commentedon Jan 20, 2020
Linux Mint 18.3 x64
Atom 1.43
I have noted all the comments above (which have been apt) and particularly tried/noted the ones detailed below:
This issue has been surprisingly difficult to resolve.
Is there anything else I can try?
wyqydsyq commentedon Jan 24, 2020
Uninstall Atom and use VSCode instead
luisbrandao commentedon Feb 27, 2020
Why this is STILL an issue?
The workaround stopped working for me.
gaetanquentin commentedon Mar 19, 2020
ubuntu 19.10
atom (snap) 1.45.0
gvfs-trash is installed
editing files on a sshfs mount
trying to delete directory (move to trash) on a local filesystem (~/home/XX) : OK
trying to delete directory (move to trash) on a mount filesystem (sshfs): KO
The following file couldn't be moved to the trash. blahblah Is gvfs-trash installed?
outside atom:
strace -e trace=file gio trash MyFile
it finds the trash but...
lstat("/mnt/XX/ssh/myhome_elitebook/.Trash", {st_mode=S_IFDIR|0775, st_size=34, ...}) = 0
lstat("/mnt/XX/ssh/myhome_elitebook/.Trash-1008", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
gio: file:///mnt/XX/ssh/myhome_elitebook/T%C3%A9l%C3%A9chargements/terraform-provider-libvirt-0.6.1+git.1578064534.db13b678.Ubuntu_18.04.amd64.tar.gz: Unable to find or create trash directory for MyFile
the pb seems to be gio
kryptus36 commentedon Jun 22, 2020
For any googlers looking:
I just ran into this on my Gentoo box.
export ELECTRON_TRASH=gio fixed it.
aurovrata commentedon Jun 29, 2020
There is an other issue that hasn't been addressed here, if you are working from the default apache installation,
/var/www/html/, then gvfs-trash will complain:NOTE: Trashing on system internal mounts is not supported
so I created a new script for
/usr/bin/gvfs-trashProbably not the best idea, but given that gvfs-trash is deprecated, I am assuming it should be ok.
Now it works, along with setting the env,
export ELECTRON_TRASH=gvfs-trash atomkin-allan commentedon Jul 13, 2021
I had the same issue and none of the solutions above had worked.
If you are like me that has your projects under
/var/www/atom will not be able to delete, aparently the delete action does not works under the filesystem mount, so I manage it doing the following:Created a folder
wwwunder my user, moved the files there, and then created a sysmlink from/var/www/to my home mountedWhen the files are on the
~/wwwI am able to delete correctly. Hope it helpsthe0neWhoKnocks commentedon Oct 26, 2021
Seeing the same error when trying to delete a folder while running Atom via Flatpak on Arch Linux. I've tried
no luck with any of the above.
The odd thing is, I'm able to delete individual files within a folder.
Also, I'm using Flatpak because I use
nfor my Node version manager, otherwise the official/AUR installs cause issues due to Node conflicts.