[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: kdesu - console output and password keeping
From: Milian Wolff <mail () milianw ! de>
Date: 2018-01-18 9:44:04
Message-ID: 1955805.yzM0sGkaEc () milian-kdab2
[Download RAW message or body]
Hey all,
We've recently integrated kdesu into hotspot [1] to be able to record profile
data as root. This is required to get access to some "advanced" performance
counters and trace points, most notably the sched:sched_switch tracepoint
required for off-CPU profiling.
Now, my colleague originally used kdesudo which doesn't seem to be alive (?)
upstream. I've seen there's some bzr repo that the kubuntu people seem to use.
But in KDE proper, only kdesu is available. So I used that instead but it has
a severe limitation: I cannot show the command output _and_ enable password
keeping:
$ man kdesu
..
-t
Enable terminal output. This disables password keeping. This is
largely for debugging purposes; if you want to run a console mode app, use the
standard su instead.
..
I don't quite get why one would want to use standard su - we want to show a
graphical dialog to the user and enable password keeping. Can someone explain
this limitation? Is there some other alternative we could use? Essentially we
run the following command right now, which shows what we need to do:
kdesu -u root -t --attach $winId -- \
perf record -o $outputfile <...more args...> -- \
runuser -u $non-root-user -- \
$userapp $userargs
kdesu -u root -t --attach $winId --
chown $non-root-user:$non-root-group $outputfile
This triggers two password prompts, which is unfortunate I think.
Thanks
[1]: https://github.com/KDAB/hotspot
--
Milian Wolff
mail@milianw.de
http://milianw.de
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic