Ubuntu – How to remove a default action in thunar

thunarthunar-custom-actionsxfce4

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 ?

Best Answer

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.