Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It's a long time since I didn't work with PolicyKit, but from what I remember, you have indeed to create a file in the actions/ directory, with contents like :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"&gt; &lt;policyconfig&gt; &lt;action id="org.freedesktop.policykit.pkexec.run-ifconfig"&gt; &lt;description&gt;Configure network&lt;/description&gt; &lt;message&gt;Authentication is required to set ifconfig parameters&lt;/message&gt; &lt;defaults&gt; &lt;allow_any&gt;no&lt;/allow_any&gt; &lt;allow_inactive&gt;no&lt;/allow_inactive&gt; &lt;allow_active&gt;...&lt;/allow_active&gt; &lt;/defaults&gt; &lt;annotate key="org.freedesktop.policykit.exec.path"&gt;/sbin/ifconfig&lt;/annotate&gt; &lt;/action&gt; &lt;/policyconfig&gt; </code></pre> <p>You have to change the value in :</p> <pre><code>&lt;allow_active&gt;...&lt;/allow_active&gt; </code></pre> <p>To the value you want. Selecting a value of :</p> <ul> <li>"no" will deny access</li> <li>"yes" will implicitly permits access</li> <li>"auth_user" requires user authentication</li> <li>"auth_admin" requires admin authentication.</li> <li>"auth_user_keep" and "auth_admin_keep" function similarly but retain authentication for a few minutes afterward. </li> <li>Plus some other values, view <a href="http://beginlinux.com/appsm/policykit/922-declaringactions" rel="nofollow">here</a>.</li> </ul> <p>Changing the allow_active key's value to "yes" should stop the authentication demands.</p> <p>Then you need to adapt the action file to your needs and to call it.</p> <p>Hugo,</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload