FS#26268 - [gksu] replace with pkexec in application launchers
Attached to Project:
Community Packages
Opened by Balló György (City-busz) - Wednesday, 05 October 2011, 06:53 GMT
Last edited by Balló György (City-busz) - Wednesday, 06 March 2013, 02:35 GMT
Opened by Balló György (City-busz) - Wednesday, 05 October 2011, 06:53 GMT
Last edited by Balló György (City-busz) - Wednesday, 06 March 2013, 02:35 GMT
|
Details
The latest version of pkexec[1] supports running X11 apps,
which makes possible to replace gksu in *.desktop files with
it.
Reasons: - gksu is an old, unmaintained package, which uses su and sudo, and not integrated well into modern desktop environments which uses PolicyKit for access control. - pkexec[2] is part of the polkit package, and makes a standard way to run applications as a different user. - polkit integrates well into DEs, KDE and GNOME has it's own authentication agent for polkit. - The most of packages that currently uses gksu are already patched to use it, so changing to pkexec will not result more divergence from upstream. Affected packages: - nvclock - wifi-radar Steps for making this change: 1. Create a new policy file with the appropriate exec.path and unique name, and place it in /usr/share/polkit-1/actions folder. 2. Create a new small shell script that launches the application with pkexec. 3. Replace Exec=* with the newly created launcher in the *.desktop file. 4. Replace gksu optional dependency with polkit. 5. Fill an upstream feature request to use pkexec. I attach a modified gparted package to demonstrate these changes. [1] Upstream feature request in polkit: https://bugs.freedesktop.org/show_bug.cgi?id=38769 [2] More info about pkexec: http://hal.freedesktop.org/docs/polkit/pkexec.1.html |
This task depends upon
Closed by Balló György (City-busz)
Wednesday, 06 March 2013, 02:35 GMT
Reason for closing: Implemented
Wednesday, 06 March 2013, 02:35 GMT
Reason for closing: Implemented
https://bugs.kde.org/show_bug.cgi?id=299718
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/997506
The solution they propose is to add a line to /etc/pam.d/polkit-1:
session optional pam_xauth.so
This did the job for me. I would suggest adding this line before switching any more packages to pkexec.
- wifi-radar is fixed now
@Doug: if it's still a problem, please report it to the appropriate project (KDM).