aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-extended/gparted/files
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2015-10-29 18:07:20 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-11-06 17:49:34 +0100
commit165de549b7a80a3a93c5ab1cc54b197101ffd2cf (patch)
tree4c4eaae6c526c659aaa7198c30b4cf3d0bcef240 /meta-gnome/recipes-extended/gparted/files
parent0bd73fae2f925297fbdca175be1923fa14c24dce (diff)
downloadmeta-openembedded-contrib-165de549b7a80a3a93c5ab1cc54b197101ffd2cf.tar.gz
gparted: add polkit support
* This was missing for me and is a good test case for xfce-polkit asking for root's password. * Decision to use polkit (installed?) is made at runtime. Unfortunately this cool solution was not my idea but stolen from [1] [1] http://pkgs.fedoraproject.org/cgit/gparted.git Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Diffstat (limited to 'meta-gnome/recipes-extended/gparted/files')
-rw-r--r--meta-gnome/recipes-extended/gparted/files/gparted_polkit10
-rw-r--r--meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy20
2 files changed, 30 insertions, 0 deletions
diff --git a/meta-gnome/recipes-extended/gparted/files/gparted_polkit b/meta-gnome/recipes-extended/gparted/files/gparted_polkit
new file mode 100644
index 0000000000..feabd0eebb
--- /dev/null
+++ b/meta-gnome/recipes-extended/gparted/files/gparted_polkit
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# polkit installed?
+if [ $(which pkexec) ]; then
+ pkexec --disable-internal-agent "%sbindir%/gparted" "$@"
+else
+ %sbindir%/gparted "$@"
+fi
+
+
diff --git a/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy b/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy
new file mode 100644
index 0000000000..77a91923eb
--- /dev/null
+++ b/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy
@@ -0,0 +1,20 @@
+<?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>
+
+ <action id="org.yoctoproject.pkexec.run-gparted">
+ <description>Run the GParted program</description>
+ <message>Authentication is required to run the GParted Partition Editor</message>
+ <icon_name>gparted</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>