In regular Ubuntu (Unity/Gnome), I use gksudo to run GUI programs with root privileges. I'm trying out Kubuntu (or KDE) now -- what do I use?

  • This seems to be too obvious to ask&answer. – Oleh Prypin Jul 20 '12 at 8:20
  • 8
    I disagree. Didn't know it before, as I've never seen the kdesudo command before. – Exeleration-G Jul 20 '12 at 23:55
  • 1
    similarly; I remember a kdesu for some reason that is 'command not found' in 15.04 at least – Mark Mar 1 '15 at 9:41

The Kubuntu/KDE equivalent of gksudo is kdesudo. You can use this in the terminal or via the graphical command box on the top of the screen (Alt-F2).

When you do this, or otherwise launch an application which requires root privileges, you will get a kdesudo popup like this:

enter image description here

Note: If you are not getting this box with GUI applications, it may indicate a problem with the way the KDE desktop environment was installed. Please try reinstalling kubuntu-desktop if you are not using Kubuntu.

  • As of Kubuntu 20.04, neither kdesudo, nor kdesu seem to be installed by default. There pkexec, but everything I tried to launch with it failed with some Qt error. – Dan Dascalescu Feb 16 at 22:51

Now it is kdesu,

Example, If I want to use Matlab, and I want to run it as sudo user then I would type in: kdesu matlab, which would open a GUI window for taking my password as input.

  • 1
    For whatever reason in Kubuntu bionic beaver the command wasn't added to the path, but I can run it from /usr/lib/kde4/libexec/kdesu – Adam Plocher Aug 20 '18 at 2:34
  • @Looserof7 Since su and sudo are both command-line apps, I would imagine that kedsu and kdesudo both exist. – jpaugh Dec 4 '18 at 17:37

As of Kubuntu 20.04, kdesudo doesn't seem to be installed by default, and kdesu is no longer in $PATH, but in /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu.

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.