Change:
When setting advanced properties on a program/link to start as another user it is throwing the error: Sorry - Plasma KDEInit could not launch 'kdesu': Could not open library 'libkdeinit5kdesu'. Cannot load library /run/current-system/sw/lib/libkdeinit5kdesu: (/run/current- cannot open shared object file: No such file or directory)  I tried to install kdesu using: [root nix-env -qaP kdesu kdesu-5.36.0 [root nix-env -iA replacing old ‘kdesu-5.36.0’ installing ‘kdesu-5.36.0’ building path(s) ‘/nix/store/2bn27h5drw0800gk5z2rmwfx78gqbbdc-user-environment’ created 2209 symlinks in user environment [root kdesu bash: kdesu: command not found [root which kdesu which: no kdesu in (/root/bin:/run/wrappers/bin:/etc/per-user-) I also tried installing but that does not work either. Any suggestions on how to get kdesu installed on NixOS? Environment: [root nixos-version 17.09pre113100. (Hummingbird) [root nix-env --version nix-env (Nix) 1.11.13 [root nix-instantiate --eval '<nixpkgs' -A lib.nixpkgsVersion "17.09pre113100." [root grep build-use-sandbox build-use-sandbox = false Stack Overflow link:
:ping_pong:
According to the kdesu package should be installed already ( said on IRC that their config enables plasma5) Building kdesu locally (but not installing plasma5) doesn't produce a kdesu binary for some reason
Possibly related error: 
I changed compositor settings to OpenGL 3.1 and the high CPU usages seems to have gone away. Oh... wrong ticket lol, but maybe related.
I “installed” through and the binary executable is also missing here. NixOS version: 17.09beta621. (Hummingbird)
gets built and installed more or less correctly (it works and everything) but the binary doesn't end up on the path. The full path is . Should we just symlink it to in the package? you can launch kdesu with If you don't want to invoke nix-build all the time just to use the command, you can use: Note that the latter choice will 'save' the copy of produced by that first invocation, and it will stay the same even if you upgrade your system. You'll want to remove that link once this issue is fixed, so that the system can just handle it.
Shouldn't kdesu be deprecated anyway in favor of pkexec/PolicyKit?
this actually launches kdesu, yes: hmm interesting, how does one explicitly run an app as root in that case?
pkexec <application_name. Apparently this is the modern version of sudo for desktop that provides consistent and secure rights elevation. But there should be a policy file for application, that outlines specifics. For example, I had problem with gsmartcontrol that tried to locate various graphical sudo frontends, but they are not installed on nixos. However, when I created a bug, the one of members hinted about new version of gsmartcontrol - and new version has pkexec support.
Neat! I didn’t know that’s what it’s called. I simply thought that’s the new backend of kdesu. Thanks :)
I want to run with the ability of remembering passwords. For that this issue has to be fixed.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . 3. Ask on the on .
Still important to me.

Discussion:
{ <del> mkDerivation, extra-cmake-modules, kdoctools, </del> <ins> lib, mkDerivation, extra-cmake-modules, kdoctools, </ins> kcmutils, kconfig, kdesu, ki18n, kiconthemes, kinit, kio, kwindowsystem, qtsvg, qtx11extras, kactivities, plasma-workspace }:

kcmutils kconfig kdesu ki18n kiconthemes kinit kio kwindowsystem qtsvg qtx11extras kactivities plasma-workspace ]; <ins> postInstall = '' # install a symlink in bin so that kdesu can eventually be found in PATH mkdir -p $out/bin ln -s $out/libexec/kf5/kdesu $out/bin ''; dontWrapQtApps = true; preFixup = '' for program in $out/bin/*; do wrapQtApp $program done # kdesu looks for kdeinit5 in PATH wrapQtApp $out/libexec/kf5/kdesu --suffix PATH : ${lib.getBin kinit}/bin ''; </ins> }

kdeclarative = callPackage ./kdeclarative.nix {}; kded = callPackage ./kded.nix {}; kdesignerplugin = callPackage ./kdesignerplugin.nix {}; <del> kdesu = callPackage ./kdesu.nix {}; </del> <ins> kdesu = callPackage ./kdesu {}; </ins> kdewebkit = callPackage ./kdewebkit.nix {}; kemoticons = callPackage ./kemoticons.nix {}; kglobalaccel = callPackage ./kglobalaccel.nix {};

<del> { mkDerivation, lib, extra-cmake-modules, kcoreaddons, ki18n, kpty, kservice, qtbase, }: mkDerivation { name = "kdesu"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ kcoreaddons ki18n kpty kservice qtbase ]; propagatedBuildInputs = [ kpty ]; outputs = [ "out" "dev" ]; } </del>

<ins> { mkDerivation, lib, extra-cmake-modules, kcoreaddons, ki18n, kpty, kservice, qtbase, }: mkDerivation { name = "kdesu"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ kcoreaddons ki18n kpty kservice qtbase ]; propagatedBuildInputs = [ kpty ]; outputs = [ "out" "dev" ]; patches = [ ./kdesu-search-for-wrapped-daemon-first.patch ]; } </ins>

<ins> From 01af4d2a098e5819c09bca37568941dcd4b89d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com> Date: Thu, 16 Jul 2020 13:21:42 -0300 Subject: [PATCH] Search for the daemon first in /run/wrappers/bin If looking first in libexec, the eventually wrapped one in /run/wrappers/bin can not be found. --- src/client.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 44fbacd..6b5abf5 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -378,11 +378,14 @@ int KDEsuClient::stopServer() static QString findDaemon() { -    QString daemon = QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/kdesud"); -    if (!QFile::exists(daemon)) { // if not in libexec, find it in PATH -        daemon = QStandardPaths::findExecutable(QStringLiteral("kdesud")); -        if (daemon.isEmpty()) { -            qWarning() << "kdesud daemon not found."; +    QString daemon = QFile::decodeName("/run/wrappers/bin/kdesud"); +    if (!QFile::exists(daemon)) { // if not in wrappers +        daemon = QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/kdesud"); +        if (!QFile::exists(daemon)) { // if not in libexec, find it in PATH +            daemon = QStandardPaths::findExecutable(QStringLiteral("kdesud")); +            if (daemon.isEmpty()) { +                qWarning() << "kdesud daemon not found."; +            } } } return daemon; -- 2.27.0 </ins>