correct prefix in .policy

pull/14/head
sezanzeb 4 years ago
parent efa5c3a7de
commit 3ed2129eda

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"
>
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"
>
<policyconfig>
<icon_name>mouse</icon_name>
<action id="org.key-mapper">
@ -13,7 +13,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/key-mapper-gtk</annotate>
<annotate key="org.freedesktop.policykit.exec.path">{executable}</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"
>
<policyconfig>
<icon_name>mouse</icon_name>
<action id="org.key-mapper">
<description>Run Key Mapper as root</description>
<message>Authentication is required to discover devices and write configs.</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">{executable}</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

@ -46,6 +46,10 @@ class Install(DistUtilsExtra.auto.install_auto):
return
with open(policy_path, 'w') as f:
print(
f'Inserting the correct path "{executable}" into '
'org.key-mapper.policy'
)
f.write(contents.format(
executable=executable
))

Loading…
Cancel
Save