9

I presume this applies to any Gnome desktop. What is the difference between these two commands? According to the Ubuntu documentation and questions that reference it, the former also sets the $HOME environment variable and copy the .Xauthority variable to temporary location, but are those the only differences for all systems running Gnome, or do they only apply to Ubuntu?

  • 2
    Between gksu and sudo? Or between gksu and gksudo? – Gilles Feb 28 '13 at 22:46
  • @Gilles I thought gksudo just linked to gksu, at least on Ubuntu. – Ricardo Altamirano Feb 28 '13 at 22:49
  • @RicardoAltamirano that doesn't mean anything. It can still function differently – daisy Mar 5 '13 at 14:56
  • 1
    @warl0ck Can gksudo function differently on a system (like Ubuntu) where it's nothing more than symlink to gksu? (It's a serious question. I don't know enough about Linux to know if it makes a difference). – Ricardo Altamirano Mar 5 '13 at 14:59
  • 1
    @RicardoAltamirano by checking the name of the soft link, if it's gksudo, act like gksudo; if it's gksu act like gksu – daisy Mar 5 '13 at 15:10
5

After searching at greater length and finding a few other sources, I think it's safe to say that gksu is nothing more than a wrapper around sudo in most cases. This source states that since gksu displays a password dialog, it's used for graphical applications (as we already know) because it can be used outside a terminal emulator. Otherwise, running sudo <cmd> from a launcher wouldn't work because the user wouldn't be prompted for a password.

1

I remember I couldn't run some X applications with sudo, but was able to run them with gksudo or kdesudo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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