Closed Gaff closed 5 years ago
I should... if only time would permit it. I need to learn everything from scratch regarding Polkit.
That said, gksu 2.0.2-9ubuntu1 is still available on Ubuntu 18.04 LTS Bionic Beaver; I have it on my laptop.
There isn't so much to learn:
When configuring the package(e.g. in the postinst
script), test whether the gksu
executable exists. If it does exist, then nothing should change from how you currently have it. If gksu
doesn't exist, however, then two additional steps are needed:
gksu
with pkexec
in /usr/bin/autopoweroff
add a /usr/share/polkit-1/actions/com.github.deragon.autopoweroff.policy
file, which contains the following:
<?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.freedesktop.policykit.pkexec.run-autopoweroff">
<description>Run Autopoweroff GUI</description>
<message>Authentication is required to run autopoweroff-gui</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/autopoweroff-gui</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
</action>
You will probably also want to make sure that the postrm script cleans up this policy file if it exists.
That explains it. Can't use on Ubuntu 18.10. Too bad the GKSU package isn't supported or available at all to install. :(
Fixed. Could you please try out the following deb package?
just tried it on latest Elementary OS 5.0, it installs fine and when running it prompt for admin rights, after that it does'nt open.
@thomasvjohansen , I cannot help you. Under Ubuntu 18.04, the package works fine for me. Can you check the logs under /var/log to see if any error shows up when you start the GUI, after you enter your password? I need clues to what is going on on the Elementary OS.
@deragon, my fault... elementary OS doesnt use gnome, apparently, its using Pantheon....
the error is: "Sorry, but this application requires Gnome 3.0 resources that are not installed on this machine. Following is the specific error
No module named gi"
@thomasvjohansen , you are suffering from issue #2. The package I provided for this issue does not contain the fix for the second issue. Once I have confirmation that this issue has been fixed, I will merge with issue #2 and officially release a new version of Autopoweroff. So please confirm that all is working fine now after installing:
sudo apt install python-gi
It should not download that much; you must have most Gnome libraries already installed since so many applications are Gnome based.
So, anybody can report if the problem is fixed? Independent testing would be nice to have. I could then release a new official version of Autopoweroff once I get confirmation of any one of you that subscribed to this issue.
It installs fine for me on Ubuntu 18.04, if that helps.
@edgimar, I am about to release a new version of Autopoweroff and I would like to give you credit since you provided the solution for me. Please tell me how do you want credit be attributed to you. You can provide me your name and email if you desire, here or by writing to me at hans@deragon.biz.
Thank you. I also ran into a problem which it could not installed on Kubuntu as there is no gksu but kdesu.
The 3.1.0 package works.
Fixed. Could you please try out the following deb package?
Fixed the issue for me. Thank you.
I was able to install the 3.1.0 version on a brand new lubuntu install, so your change seems to have worked. Thank you for the program!
This issue is fix in release 3.1.0.
Hi,
Do you have any plans to move off gksu and onto polkit? Turns out the latest Ubuntu doesn't even have gksu any more. See: https://answers.launchpad.net/ubuntu/+source/gksu/+question/669978
Thanks!