Which when I restarted the polkit service I was able to run the program without error.
Obviously this is not a good solution as it would not solve any other forward slash issue, so I provided a better solution, which can be seen in my pull request.
Solution: Get Absolute Path of gufw-pkexec
Before:
pkexec gufw-pkexec $c_user
After:
pkexec "$(which gufw-pkexec)" $c_user
This ensures the correct path of gufw-pkexec will always be sent.
Problem
When running
gufw
from the command line I came across this error:Explanation
The important bit is
/usr/bin//gufw-pkexec
In the polkit com.ubuntu.pkexec.gufw.policy file it has this line:
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gufw-pkexec</annotate>
Polkit does not recognize the paths being the same since it includes a double forward slash ('//').
I confirmed this was the issue by adding this line into this file:
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin//gufw-pkexec</annotate>
Which when I restarted the polkit service I was able to run the program without error.
Obviously this is not a good solution as it would not solve any other forward slash issue, so I provided a better solution, which can be seen in my pull request.
Solution: Get Absolute Path of
gufw-pkexec
Before:
pkexec gufw-pkexec $c_user
After:
pkexec "$(which gufw-pkexec)" $c_user
This ensures the correct path of
gufw-pkexec
will always be sent.