Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

How do I run a GUI program with root privileges from Ubuntu's Alt+F2 Run dialog?

share|improve this question

closed as off topic by sysadmin1138 Feb 25 '11 at 17:38

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

On CentOS I am getting error on using gksu and gksudo. When I use -d for debugging, I get error message from sudo 'buffer: -sudo: sorry, you must have a tty to run sudo-'. May be gksu and gksudo call sudo at backend. – Saurabh Barjatiya Jul 20 '09 at 12:39
up vote 4 down vote accepted

The appropriate way to run a gui app as root in a Gnome environment is to run the app using gksu.

So once you have the Run Dialog up type 'gksu application' replacing application with the binary you wish to run as root.

share|improve this answer

gksudo will invoke sudo, rather than su, so you can use your own password, not the root password. (Presuming your user has sudo privillages).

share|improve this answer
+1 Yes gksudo is also a good alternative. I should have mentioned it in my answer as well. – 3dinfluence Jul 20 '09 at 12:10
gksu asks for your password if root has no password - as is the case in the default Ubuntu install. – Hamish Downer Jul 20 '09 at 14:55
Ah, clever ubuntu! :) – Coops Jul 20 '09 at 16:05

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