pkexec error in EasyOS
Forum member jon7 reported that the 'linssid' DEB did not work in
EasyOS:
https://easyos.org/forum/showthread.php?tid=24
Linssid has a script /usr/bin/linnsid-pkexec, which has this:
#!/bin/sh
pkexec "/usr/sbin/linssid" "$@"
'pkexec' is a binary executable, in the 'policykit-1' DEB.
Easy has policykit to satisfy dependencies, however doesn't
actually use it.
Any attempt to use it has to be bypassed, so I have created a
script /usr/bin/pkexec to replace the one from the policykit
package:
#!/bin/bash
while [ "${1:0:2}" == "--" ];do
[ "$1" == "--user" ] && shift
shift
done
EXE="$1"
shift
[ "$EXE" ] && exec ${EXE} "${@}"
Which I think will behave in conformance with the commandline
options as shown on the man page:
https://www.freedesktop.org/software/polkit/docs/0.105/pkexec.1.html
There is now a 'policykit' entry in 'packages-templates' folder
in WoofQ that achieves this replacement.
Tags: easy