Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-02-18 15:16:18

arthursw
Member
Registered: 2022-02-18
Posts: 2

Prevent deleting files in XCFE Desktop

I use XFCE 4.12 on Ubuntu 18.04 ; and I would like to avoid deleting files inadvertently from the right-click menu:

XFCE right click menu

Both "Move to Trash" and "Delete" menu items permanently delete my files ; which can be really dangerous when I release my mouse button at the wrong item (I deleted a folder instead of renaming it).

    - Is there a way to remove those menu items?
    - Or can I disable file deletion from XFCE and only allow it from the command line?


I also posted this question on Super User : https://superuser.com/q/1705629/289266

(I must have a problem with the configuration of the trash on my system since "Move to Trash should send the files to the trash but that does not happen: files are deleted instead. However, this would not be a problem if I didn't have the menu item.)

Offline

#2 2022-02-18 15:38:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Prevent deleting files in XCFE Desktop

Hello and welcome.

Make sure that the gvfs-daemons package is installed and that the gvfsd-trash executable is running.

Edit: Also, what is managing your desktop? Is it xfdesktop?

ps -ef | grep desktop

Last edited by ToZ (2022-02-18 15:39:24)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-02-18 15:49:07

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Prevent deleting files in XCFE Desktop

A toggle to control the Delete context menu item was added in version 1.8.2 (which added a misc-show-delete-action property in Thunar's Xfconf channel), while in the bionic repositories the latest available is 1.6.15.

Does the Trash directory actually exist in your home directory? Run the following to check:

stat $HOME/.local/share/Trash

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#4 2022-02-21 09:42:58

arthursw
Member
Registered: 2022-02-18
Posts: 2

Re: Prevent deleting files in XCFE Desktop

Hello and thank you!

- gvfsd-trash is running,
- gvfs-daemons package is installed,
- it seems xfdesktop is managing my desktop,
- the Trash directory exists in my home directory,
- the trash works properly (I can trash files with "Move to trash" menu item, and restore them with the "trash-restore" command in a terminal), but remains empty in the navigation windows (the trash:/// windows is always empty ; which is not a problem since I can use trash-restore).

Is it safe to update to the version 1.8.2 while staying with Ubuntu bionic?
Or is there another way to remove the "delete" item from the right-click menu?

Offline

#5 2022-02-21 12:21:29

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Prevent deleting files in XCFE Desktop

Xubuntu 18.04 reached its end-of-life almost a year ago. I'd recommend upgrading to 20.04

Also, please keep in mind that although it is technically the official Xfce Forum, no user here represents the Xfce team in any official capacity. We're just volunteers who actively visit the forum and post our questions—and answers—on our own accord.

Last edited by KBar (2022-02-21 12:29:05)


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 550.59 KiB (Peak: 551.44 KiB) ]