Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-08-18 21:22:10

wisemagic
Member
From: Louisiana U.S.A.
Registered: 2011-09-17
Posts: 37
Website

Custom Actions

Hello

Thinking about upgrading to Debian 10. Still testing, and probably won't upgrade...... but

gksu has been depreciated and no longer in the repository

In Stretch I use medit.

gksu medit %f

to edit root files

I tried to

pkexec medit %f and it fails
pkexec mousepad %f and it fails

Any suggestions?

Also
pkexec thunar %F DOES work

Offline

#2 2019-08-18 21:59:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Custom Actions

You need to have a corresponding policykit action file for each program. Usually these are saved in /usr/share/polkit-1/actions. Here is the english-only version for mousepad:

# cat /usr/share/polkit-1/actions/org.xfce.mousepad.policy

<?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>  

 <vendor>Mousepad</vendor>
 <vendor_url>http://xfce.org/</vendor_url>
 <icon_name>accessories-text-editor</icon_name>

 <action id="org.xfce.mousepad">
 
 <description>Run Mousepad as root</description>
 <message>Authentication is required to run Mousepad as root.</message>

 <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/mousepad</annotate>
 <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
 </action>

</policyconfig>

You'd need a similar one for medit.


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

#3 2019-08-19 00:46:45

wisemagic
Member
From: Louisiana U.S.A.
Registered: 2011-09-17
Posts: 37
Website

Re: Custom Actions

Thanks ToZ

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 523.98 KiB (Peak: 528.94 KiB) ]