Page 1 of 1
gksu vs sudo
Posted: Tue Mar 27, 2007 11:37 pm
Is there a reason for using "gksu" to open an application with root privileges instead of sudo ? The reason I ask is I'm use to distro's that only use "su" instead of "sudo" "gksu"
Example: "gksu gedit" vs "sudo gedit" vs "su kate"
What does the 'gk' stand for ?
Posted: Wed Mar 28, 2007 1:33 am
It is a Gtk sudo, good for using with Gtk written GUI apps.
sudo uses a sodoers list and you use your own password to be root.
su needs a root or the particular users password to use unless you are already root.
Posted: Wed Mar 28, 2007 4:56 am
su = Switch user. "su -" switches to root.
sudo = SuperUser do. Do something as the superuser "root".
Combinations are also possible: sudo su - ... gives you a root shell.
Posted: Wed Mar 28, 2007 7:42 am
Very good question...
"sudo gedit" and "gksu gedit" are pretty much the same... with sudo you'll have to write the password in the console before gedit opens.. with gksu it might come up as a dialog box before gedit opens... so it's more or less the same stuff.
The REAL advantage of gksu is when you want to get your console back...
If you type "sudo gedit &" the "&" bit gives you the console back.. and you don't get the opportunity to type the password for sudo.. so gedit simply doesn't open
To solve this problem you replace it with "gksu gedit &". This way your console is freed, and the password dialog box is there as well.
Same goes for kdesu.
Posted: Wed Mar 28, 2007 8:14 am
Thanks to all of you, now I understand
The REAL advantage of gksu is when you want to get your console back