What's difference ?

link|improve this question

44% accept rate
Good question. Im learning Linux now (You can see that I haven<t found my keyboard layout yet) Haha! – r0ca Oct 23 '10 at 21:24
feedback

2 Answers

up vote 8 down vote accepted

sudo asks for the password on the command line, and gksudo pops up a dialog box for it.

link|improve this answer
is that all?............ – oneat Oct 23 '10 at 20:06
yes, thats the difference – knitti Oct 23 '10 at 20:28
gksu(do) also has its own configuration of which environment variables to pass through to the child, separate from su(do)'s own. For example, if your sudoers config specifies !keep_env, the lack of $DISPLAY may prevent graphical applications from running, but gksudo should work. You can find some details at git.debian.org/?p=users/kov/gksu-polkit.git;a=blob;f=common/… or live.gnome.org/gksu . – ephemient Oct 23 '10 at 21:55
feedback

Using regular sudo to run graphical programmes will on a rare occasion mess up permissions on some files. To be safe gksudo (or kdesudo as appropriate) should be used for running programmes with a GUI. I think this is a bug really, although I heard explanations that gksudo understands X server variables and sudo does not possibly leading to problems. Just as a tip; if you are running graphical programmes as root, instead of opening up one terminal for each programme you want to run, type ALT-F2 (alt and function key 2 at the same time), then type in the dialogue box that pops up "gksudo programme" without the quotes and programme replaced by the application you want to run.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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