2

I am running a fairly current version of Kubuntu...

Kernel: 4.13.0-36-generic x86_64 bits: 64 Desktop: KDE Plasma 5.10.5 Distro: Ubuntu 17.10

In all the "KDE" distros I've used in the past I could easily run "gui" apps with elevated credentials: ie. "sudo dolphin", "kdesu dolphin", etc.

With kubuntu I cannot get any of these to work. I managed to do a cli "cp" to get some scripts moved to /usr/local/bin but I'm not a Linux tekkie so it was a real fight for me. If I can't get the apps I normally use to run "elevated" on those rare occasions when I have that need then kubuntu is not a good fit for me. Is there a way I can continue using kubuntu and do what I need to do?

Specifically: I need to run Dolphin with root privileges.

Thank you

Tovian
  • 21

2 Answers2

2

Clarification: your issue with Dolphin will be found in all recent KDE distros, not just Kubuntu.

The KDE developers are working on a polkit route to allow temporary elevated privileges as they have already done for Kate.

Until then, consider installing another file manager to use when you want to use a file manager with elevated privileges. sudo -H before the executable's name should do the job.

PCManFM, the default file manager in Lubuntu, and Thunar, the default in Xubuntu, are both lightweight and won't pull in too many dependencies. Midnight Commander, also in the sofware center, is another powerful file manager but it will take some getting used to.

DK Bose
  • 42,548
  • 23
  • 127
  • 221
-3

sudo dolphin should work, if you want to input your password in a gui, use gksu dolphin. this should work both from cli and if you press alt-f2

  • 2
    gksu won't work with Wayland in 17.10 and one should avoid sudo with graphical application. -1 – David Foerster Mar 04 '18 at 16:30
  • I did not know that, haven't worked with wayland. but can you also say why you should avoid sudo with a graphical application? – Glenn van Acker Mar 04 '18 at 16:33
  • 2
  • I see your point, but that post does not say that it should always be avoided, since you're not really using the root user, but a sudoer. also, in ubuntu, gksu points to gksudo, which does not execute as root user, but as the current user with elevated privileges. as described here: https://askubuntu.com/questions/21033/what-is-the-difference-between-gksudo-and-gksu/21038#21038 So i don't see the danger in that since it doesn't change ownership of any configuration files – Glenn van Acker Mar 04 '18 at 16:58
  • 1
    In any case, with the Dolphin version available in 17.10, one can't use Dolphin as root. That was not the case with Dolphin in 17.04 and earlier versions. – DK Bose Mar 04 '18 at 17:31
  • I would never advise running anything as root, but sudo is not root – Glenn van Acker Mar 04 '18 at 18:12
  • @GlennvanAcker: You're wrong. sudo changes the real and effective user and group ID of processes to that of the target user and group (typically root) which is exactly the same as running processes as that user in the first place since UNIX processes don't have any other ownership information attached to them. This affects file access control and the owner and owner group of newly created files as explained in the accepted answer to the linked question. – David Foerster Mar 04 '18 at 18:57
  • i'm sorry, but you're wrong. In many debian based distro's this is correct. however, in ubuntu. you cannot log into the root user by default, except when using su. sudo actually runs commands with elevated privileges, as a sudoer. this is why you can add users to the sudo list. This does not mean that every user in the sudo list can run commands as root. http://manpages.ubuntu.com/manpages/trusty/man8/sudo_root.8.html – Glenn van Acker Mar 04 '18 at 19:05