gksudo 16.10

Nils Kassube kassube at gmx.net
Fri Nov 4 13:28:28 UTC 2016


Ralf Mardorf wrote:
> that doesn't explain if the OP knows the difference.

No, it doesn't, but your question was "However, what should be the 
advantage of gksudo over sudo?". And the link and quote I posted should 
give an answer.

> Working with root privileges doesn't require the usage of a command,
> it requires understanding what we do.

Well, I'd say it requires both because otherwise you're not doing 
anything as root, but that might be a bit too petty.

Anyway, to show the problem of running "sudo whateverGUIapplication" I 
made an experiment. With a Kubuntu 14.04 live session (on my USB stick 
there is no other *Ubuntu flavour, sorry) I installed gedit. Then I run 
the command

sudo gedit

and I changed some gedit preferences. Then I quit gedit and run the 
command

sudo kate

and again I changed some kate preferences.  Then I quit kate and run the 
command

sudo find -user root

which should return nothing if using sudo with a graphical application 
was OK. However the output was this:

./.dbus
./.dbus/session-bus
./.dbus/session-bus/04a0ce3bdfba0714c54add5a581c87eb-0
./.kde/share/apps/kate
./.kde/share/apps/kate/plugins
./.kde/share/apps/kate/plugins/katecloseexceptplugin
./.kde/share/apps/kate/plugins/project
./.kde/share/apps/kate/plugins/katesearch
./.kde/share/apps/kate/plugins/filetree
./.kde/share/apps/kate/sessions
./.kde/share/config/katepartpluginsrc
./.kde/share/config/katesyntaxhighlightingrc
./.kde/share/config/kateschemarc
./.kde/share/config/katescriptingrc
./.local/share/recently-used.xbel
./.config/enchant
./.config/enchant/en_US.exc
./.config/enchant/en_US.dic
./.config/gedit
./.config/gedit/accels
./.config/dconf
./.config/dconf/user
./.config/oxygen-gtk
./.config/oxygen-gtk/argb-apps.conf
./.cache/dconf

Applications that want to use any of those files / folders, which are 
now owned by root, may no longer work correctly if run as a normal user.


Nils





More information about the ubuntu-users mailing list