vscode-fileutils icon indicating copy to clipboard operation
vscode-fileutils copied to clipboard

Unable to delete file on Ubuntu

Open As1fAli opened this issue 2 years ago • 5 comments

Describe the bug Maybe due to permissions issue, I cannot delete file on Ubuntu Linux.

To Reproduce

  1. Open a file in VS Code you want to delete.
  2. Open command prompt using ctrl+shift+p
  3. Click on 'File Utils: Delete'

Screenshots image

Desktop (please complete the following information):

  • VSCode Version: 1.81.0
  • OS Version: Ubuntu 22.04
  • FileUtils Extension Version: 3.10.3

As1fAli avatar Aug 17 '23 09:08 As1fAli

This problem may be caused by that the file to delete is not on the same mount point as your $HOME.

I resolve this by starting vscode with envvar ELECTRON_TRASH=kioclient5. Full list of options are:

  • kioclient5
  • kioclient
  • trash-cli (sudo apt install trash-cli)
  • gvfs-trash

hsfzxjy avatar Sep 12 '23 17:09 hsfzxjy

This problem may be caused by that the file to delete is not on the same mount point as your $HOME.

I resolve this by starting vscode with envvar ELECTRON_TRASH=kioclient5. Full list of options are:

  • kioclient5
  • kioclient
  • trash-cli (sudo apt install trash-cli)
  • gvfs-trash

Can you please send here the command to run vscode with envvar set?

As1fAli avatar Sep 12 '23 17:09 As1fAli

Make sure:

  1. Command kioclient5 is available
  2. All vscode instances are shut down. You may verify via ps aux | grep code

Then run ELECTRON_TRASH=kioclient5 code /path/to/your/workspace

hsfzxjy avatar Sep 12 '23 17:09 hsfzxjy

Make sure:

  1. Command kioclient5 is available
  2. All vscode instances are shut down. You may verify via ps aux | grep code

Then run ELECTRON_TRASH=kioclient5 code /path/to/your/workspace

Okay Thanks, I will try.

As1fAli avatar Sep 12 '23 17:09 As1fAli

You may replace "kioclient5" with other values listed above, as things could vary on different machines.

hsfzxjy avatar Sep 12 '23 17:09 hsfzxjy