Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Thunar has an option to add context menu custom actions to open Terminal, or to open folders and files in different applications.

Could it be possible to add a menu custom action that would open Thunar itself as root?

share|improve this question
up vote 3 down vote accepted

It appears that this is indeed possible. Following are specific instructions to add such an action, taken from this site.

Opening a root Thunar
Name: Open a root Thunar here
Command: gksu thunar %f
File pattern: *
Appears if selection contains: Directories

Edit: fixed link

share|improve this answer
is there a way that change is so that i can open nearly anthing as root? – user194862 Oct 10 '13 at 11:54
Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens... – dez93_2000 Oct 15 '14 at 0:12
to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder. – dez93_2000 Sep 19 '15 at 16:00

a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe

create a newfile with the following

# Super User Execute
# Gives PkExec current environmental variables
#  and passes current parameters thru running shells to it.
# Use this file instead of gksu, gksudo, and, pkexe.
# /usr/bin/suxe

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6

save it as: ~/suxe (note: some distros DO NOT like the ~/ shorthand for home folder access. So, use your actual path in this situation) e.g /home/Johnny/Documents/suxe

then make it an executable file in /usr/bin

sudo cp ~/suxe /usr/bin/suxe

make it executable

cd /usr/bin
su chmod -x ./suxe

now in Thunars' custom action use:

Name: Open with admin access

Command: suxe thunar %f

File pattern: *

Appears if selection contains: Directories

hope this helps

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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