FS#33244 - [polkit] cannot run gui apps with pkexec
Attached to Project:
Arch Linux
Opened by Mihai Coman (z0id) - Sunday, 30 December 2012, 13:36 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 31 January 2013, 14:17 GMT
Opened by Mihai Coman (z0id) - Sunday, 30 December 2012, 13:36 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 31 January 2013, 14:17 GMT
|
Details
Description:
Running a X application with pkexec fails with a "cannot open display" error, even though the appropriate policy file with allow_gui is in place. Additional info: https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/997506 The above launchpad bug mentions it's KDM only, but I can't verify that since I use KDE. * package version(s) polkit 0.107-4 Steps to reproduce: ex: gparted, unetbootin use pkexec Fix: Add the following line in /etc/pam.d/polkit-1: session optional pam_xauth.so |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Thursday, 31 January 2013, 14:17 GMT
Reason for closing: Fixed
Additional comments about closing: polkit 0.109-1
Thursday, 31 January 2013, 14:17 GMT
Reason for closing: Fixed
Additional comments about closing: polkit 0.109-1
Also, mind that unetbootin (maybe others, too) has fallbacks on just about every graphical sudo/su program.
% pkexec kwrite
kwrite: cannot connect to X server
FS#33243for an example of how unetbootin fails with polkit/pkexec, after introducing a policy file.Free to close this then. I'll investigate later.
Attached to policy file to test. No issues here. (polkit 0.107-4)
This is still an issue here with the latest version of polkit and pekwm. It works in a terminal, but not with alt-f2 or from xfce4-menu.
As I gather, there are other lightweight windowmanagers that pkexec also doesn't work with.
pkexec still not working here:
$ pkexec kate
kate: cannot connect to X server
Polkit packages installed:
polkit 0.109-1
polkit-gnome 0.105-1
polkit-kde 0.99.0-2
polkit-qt 0.103.0-1
kcm-polkit-kde-git
Afer trying Mihai's fix (adding the rule to polkit-1) I had systemd asking for a user to authenticate and proceed in the console but just once - which by the way, failed to launch the application with the same error.
FS#33243for an example.FS#33243for an example."Hmm, seems I'm a bit rusty with polkit and pkexec ¬¬
That did it. Now I know how pkexec authenticate applications I can start creating .policy files for the AUR packages I use and don't provide them and send them to 'upstream' packagers.
Thanks!