Web lists-archives.com

Re: kdesu - console output and password keeping

El dijous, 18 de gener de 2018, a les 10:44:04 CET, Milian Wolff va escriure:
> 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?

I guess the suggestion would be to use the polkit stuff?


> 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