How to add ‘Open File/Folder as Root’ in Elementary OS Freya

Elementary OS Freya. Simple. Elegant. But there is still some things I miss, like the option to open a folder or a file with root permissions from the file explorer. With these easy steps this issue can be easily solved:

1.- Install gksu in order to be able to prompt for superuser permissions from the window manager.

[codebox 1]

2.- Create the “open folder as root” contractor.

[codebox 2]

3.- Add this to the contractor:

[codebox 3]

4.- Create the “open file as root” contractor.

[codebox 4]

5.- Add this code to the contractor:

[codebox 5]

And… Done!