Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-04-27 16:12:52

makitso
Member
From: Tucson, Arizona, USA
Registered: 2017-05-02
Posts: 3
Website

Thunar Custom Actions

I have two custom actions, one to edit a file as root and another to open folder as root.  Each uses gksu.
The problem is that Debian has removed gksu from their repositories, which flow down to xubuntu 18.04  I have looked for an alternative way to configer a custom action but can't get it to work.  Any ideas?

gksu geany %f
gksu thunar %f

Offline

#2 2018-04-27 16:37:39

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,270

Re: Thunar Custom Actions

gksu's replacement is pkexec. Thunar already ships with a policy file, so the following should work:

pkexec thunar %f

Geany doesn't have a policy file so you have to create one. Create /usr/share/polkit-1/actions/org.geany.pkexec.policy with the following content:

<?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.0/policyconfig.dtd">
<policyconfig>

  <vendor>Geany</vendor>
  <vendor_url></vendor_url>
  <icon_name>geany</icon_name>

<action id="org.geany.pkexec">
   <description>Run Geany as root</description>
   <message>Authentication is required to run Geany 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/geany</annotate>
   <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
 </action>

Then:

pkexec geany %f

...should work.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#3 2018-04-27 18:45:53

makitso
Member
From: Tucson, Arizona, USA
Registered: 2017-05-02
Posts: 3
Website

Re: Thunar Custom Actions

Bless you, that worked like a champ!!!

Offline

Board footer

Powered by FluxBB