Kevin Lemaire Kevin Lemaire - 9 months ago 44
Linux Question

Remote creation of Custom actions in Thunar

I'm using Thunar as file browser for a linux network composed of 100 CentOS 7.2 machines. We are managing the installation of those workstations with a PXE server and SaltStack installation.
I need to create those custom actions during the installation.

Currently, Thunar is installed on every workstations, the script is available on a share but I need to create the custom action on each machine. Open Thunar, Edit > Create custom actions and it launches my script in xterm for the selected folder:

xterm -e "/path/to/my/ %f"

Is there a way to create Thunar's custom actions from command lines or by editing a file so that I will be able to launch them through Salt

Thanks for your help.

Answer Source

I've found out that those Custom actions are store in this file:

cat ~/.config/Thunar/uca.xml 

Here is an example of the syntaxe:

<?xml encoding="UTF-8" version="1.0"?>
    <name>My custom action</name>
    <command>xterm -e &quot;/path/to/my/ %f&quot;</command>

That way, I can create this template file and copy it in the user folder.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download