I read the explanation to add a Custom Action, and how to remove them. But I'd like to remove the "delete" custom Action to keep only those I want.

Is it possible to Remove defaults custom actions, or to select them or do we have to keep some Custom Actions like "Delete" or others ?

Thunar image

And if yes, how can we manage ?

  • What do you mean by "default" custom actions? That's a bit of an oxymoron. Do you mean you want to remove some of the options (other than custom actions) you see when you right-click on something? – user25656 Aug 26 '13 at 2:08
  • Thancks for your answer ! Sorry for my english, yes I thinck I'm talking about the options : !Valid XHTML. Thanck you for your patience – user187267 Aug 26 '13 at 6:30
  • Sorry, here is the link for a better pic i.imgur.com/lIaizFR.png Thanck you :) – user187267 Aug 26 '13 at 6:39

As far as I understand.. you want to remove the "Delete" action in Thunar.
Keep in mind that those are "Default Actions" not "Custom Actions". They are in the Thunar's source code.

In order to remove the "Delete" default action you should download the source code, edit, and then recompile it.

NOTE: In my case I'm running Xubuntu 13.04 with Thunar 1.6.2

enter image description here

You can try the following:

1) Open a Terminal and install the necessary packages.

  • sudo apt-get install build-essential

2) Install build dependencies

  • sudo apt-get build-dep thunar

3) Create a folder to download the source code.

  • mkdir ~/Downloads/src

  • cd ~/Downloads/src

4) Download the source code.

  • apt-get source thunar

5) Edit the the file "thunar-standard-view.c"

  • mousepad thunar-1.6.2/thunar/thunar-standard-view.c

You should remove the line number "402" and save the changes.

{ "delete", GTK_STOCK_DELETE, N_ ("_Delete"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_delete), },

Before: enter image description here

After: enter image description here

6) Go to the "thunar-1.6.2" folder to build the deb packages.

  • cd thunar-1.6.2/
  • dpkg-buildpackage -rfakeroot -uc -b

7) Now you can install the deb packages.

  • cd ..

  • sudo dpkg -i *deb

8) Finally you can logout and Login to see the changes.

9) Your thunar file manager should look like this:
(without the "Delete" Action")

enter image description here

hope it helps.

  • WOOOOOOOOW thancks for you explanations ! they are great ! I'll try it as soon as possible, I realized, thancks to you, the important thing about having the code source ! Thancks again ! it's really great. sharing is good - RMS - – user187267 Aug 27 '13 at 6:17
  • Thanck you ! it worked great ! PS : don't forget to activate the universe packages or you'll have a little message in step 2 :) in the ubuntu software center (logithèque ubuntu) > edit > source > and check "source code" Thancks again ! – user187267 Aug 28 '13 at 7:51

Actually, you can remove the Delete context menu from settings:

  • click Edit
  • choose Preferences
  • in tab Behavior, under Context Menu, check Show action to permanently delete files and folders

But Roman Raguet's solution above works well. Gee, Thunar's context menu's getting messier like Windows Explorer :) I wish there's a simpler option to remove/arrange context menu like custom actions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.