How do I gain root access to my own folders when using file manager?

This can be done using "Custom Actions".

  • GUI method:

Open Thunar and go to the following option:

enter image description here

There, select Add, and write something like this:

enter image description here

After this change, restart Thunar, and now, once you right-click, you will see something like this:

enter image description here

That will prompt a window asking you to introduce the password, and you are done.

More information can be found here.

  • Non-GUI Method:

Go to ~/.config/Thunar/ and open the file called uca.xml with a text editor (double-clicking will open a browser). Then, create a new entry like this (here, with the same properties as in the GUI method):

<action>
    <icon>changes-prevent</icon>
    <name>Open Folder as root</name>
    <unique-id>1426762241486505-1</unique-id>
    <command>gksudo thunar %f</command>
    <description>Open a folder as super user</description>
    <patterns>*</patterns>
    <directories/>
</action>

Save, restart thunar, and enjoy!


Finally, regarding your naming question, the program is called Thunar (as opposed to Nautilus in Gnome), but it is a File Manager (category of program), so I imagine that is why it gets the generic name. In fact, from a terminal, you can start it with thunar but not with file-manager or so.


Note: Another useful option is to open a file as Root (generally a script or text file). The code would be something like this:

<action>
    <icon>locked</icon>
    <name>Open File as root</name>
    <unique-id>1426762251695002-2</unique-id>
    <command>gksudo mousepad %f</command>
    <description>Open a file as super user</description>
    <patterns>*</patterns>
    <text-files/>
</action>

You can type

$gksu thunar %f

to access thunar as root