2

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

Alex
  • 2,357
  • 5
  • 32
  • 41
  • 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

2 Answers2

5

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

Coops
  • 6,055
  • 1
  • 34
  • 54
4

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.

3dinfluence
  • 12,449
  • 2
  • 28
  • 41