You are not logged in.
I did not anticipate this running on a 3.9 Gb image.
It got my CPU usage way up. :-)
code echo password | sudo -S geany %f /code
I only want it running on text files.
How can I avoid that?
Ubuntu-Mate 24.04
Offline
Honestly, you shouldn't use sudo for this kind of stuff. You should transition to using pkexec.
To do so, first create the file /usr/share/polkit-1/actions/geany.policy with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "https://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Geany</vendor>
<vendor_url></vendor_url>
<icon_name>geany</icon_name>
<action id="geany">
<description>Run Geany as root</description>
<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">/usr/bin/geany</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
...and save the file.
Make sure you have a polickit authentication agent running:
ps -ef | grep polkit
Then in your custom action use:
pkexec geany %f
...and you should be prompted for your password to continue.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks.
Ubuntu-Mate 24.04
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 524.55 KiB (Peak: 529.41 KiB) ]