gksu vs sudo

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

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.
:D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
Now where was i going? Oh yes, crazy!
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

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.
User avatar
clem
Level 12
Level 12
Posts: 4303
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Post by clem »

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.

Clem
Locked

Return to “Other topics”