Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gvfs-trash deprecation (can't delete file) #1059

Open
5 tasks done
jboilesen opened this issue Jul 17, 2024 · 4 comments
Open
5 tasks done

gvfs-trash deprecation (can't delete file) #1059

jboilesen opened this issue Jul 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jboilesen
Copy link

jboilesen commented Jul 17, 2024

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

While trying to delete a file in the project file tree panel I was getting the message "Is gvfs-trash installed?" and the file was not being deleted.

To workaround this I had to install GIO using sudo apt-get install libglib2.0-dev and then reference it as /usr/local/bin/gvfs-trash

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

Pulsar version

1.119.0 x64

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Debian Bookworm 12 6.1.0-22-amd64

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

  1. Install pulsar
  2. Open pulsar
  3. Add a project folder "File > Add Project Folder"
  4. Right click on a file > Delete
  5. The error message "Is gvfs-trash intalled?" is displayed and the file still there

Additional Information:

No response

@jboilesen jboilesen added the bug Something isn't working label Jul 17, 2024
@confused-Techie
Copy link
Member

Thanks a ton for reporting this issue.

After following the link you mentioned, it seems to indicate that this is an issue present in Electron itself, and since Pulsar is still on a slightly older version, we may be limited in what we can do to resolve this.

Did you try setting the environment variable ELECTRON_TRASH to gio like some of those docs talk about?

If that gets things working for you that'd be awesome until we are able to bump our Electron version

@jboilesen
Copy link
Author

Thanks for your reply.

I tried to reproduce and test setting ELECTRON_TRASH variable but after installing gio with sudo apt-get install libglib2.0-dev the issue was already solved.

@confused-Techie
Copy link
Member

confused-Techie commented Jul 23, 2024

Interesting, I was looking into this. Essentially Pulsar just uses electron.shell.moveItemToTrash().

This itself for our current version of Electron (v12.2.3) seems to end up resulting in the logic shown here.

Which in some way is inferring and working with the KDE version, the ELECTRON_TRASH environment variable, and the options of kioclient5, koclient, trash-put, trash-cli, gcfs-trash, and gio.

As I'm unfamiliar with these options, it seems a tad bit confusing. But I will say the tree-view issue linked by the user above, itself links to the Electron repo with the same issue, whose fix listed is something we actually have in Pulsar already.

So this may be as simple as Electron being unable to find gio based on how the user had it installed, since installing via libglib2.0-dev seems to have resolved it.

@jboilesen
Copy link
Author

That's really interesting. I am using XFCE 4 and I bumped into some threads mentioning something about a $Trash environment variable.

That may be a way to look into to find out more about these Distro/Desktop Environment differences. I'll read more about it and I'll return with more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants