[blfs-support] Polkit Actions

Armin K. krejzi at email.com
Wed Dec 11 13:56:28 PST 2013

On 12/11/2013 10:06 PM, Dan McGhee wrote:
> On 12/11/2013 12:20 PM, Armin K. wrote:
>> On 12/11/2013 06:45 PM, Dan McGhee wrote:
>>> In addition to GParted, I would like to employ this method for the
>>> Catalyst Control Center for my ATI-Radeon chip.
>> You have to edit both .desktop files and add "pkexec /path/to/program"
>> to the Exec= line. Do note that using pkexec requires an authentication
>> agent to be running, such as polkit-gnome or lxpolkit.
>> The file you mentioned is necessarry because pkexec won't allow running
>> gui programs by default.
> When I first read this, I didn't do anything because I have polkit-gnome 
> installed. When I made the changes for pkexec in the gparted.desktop 
> file and tried to run it, nothing happened. I didn't even get the 
> message that I needed to be root. I guess that's progress.

You don't need to be root. As I said, pkexec *won't* allow you to run
gui programs when using "pkexec guiprogram" unless you *create* a policy
file in /usr/share/polkit-1/actions (which is the file you posted and I
linked to in the arch forums).

> But when I checked my installation of polkit-gnome, I discovered that I 
> had forgotten to add the helper file in /etc/xde/autostart. I created 
> that file and tried to run GParted again and once more nothing happened. 
> I took a closer look at the file and saw the line:
>> AutostartCondition=GNOME3 unless-session gnome

This condition makes sure polkit-gnome doesn't start in gnome-shell
environment, which has its own polkit-authentication-agent, but that it
starts in gnome fallback, which was available back then.

> I'm not using Gnome, but xfce4. I logged out and restarted xfce4, but 
> gnome-polkit didn't start. I don't know how to change the line in the 
> polkit-gnome.desktop file.
> Dan

You don't need to change it at all.

Note: My last name is not Krejzi.

More information about the blfs-support mailing list