In Gnome, there is gksudo
.
In KDE, there is kdesudo
.
Is there a command that can be run on any desktop environment that will prompt the user for the root password and then run a command?
In Gnome, there is gksudo
.
In KDE, there is kdesudo
.
Is there a command that can be run on any desktop environment that will prompt the user for the root password and then run a command?
The manpage for the zenity
command contains the following description:
zenity is a program that will display GTK+ dialogs, and return (either in the return code, or on standard output) the users input.
As far as I can tell (and my testing backs this up), this will work in both the Gnome and KDE desktop environments. For example:
zenity --password | sudo -S nautilus
...will prompt you for your root password and then launch Nautilus.
gksu
/kdesudo
rather than sudo
though? Something about setting up the proper environment.
Jan 10, 2013 at 6:34