Pages

May 01, 2016

Adding "Run" options to Thunar

 Clicking on executable shell files no longer executes them in Thunar.

While there is a hidden option to revert to the old behavior, I decided in a new install to instead add right menu "Run" and "Run in terminal" custom actions. First create the custom actions from within Thunar to get valid unique-ids, and then open ~/.config/Thunar/uca.xml and edit the entries as needed:

<action>
    <icon>system-run</icon>
    <name>Run</name>
    <unique-id>xxxxxxxxxxxxxxxx-x</unique-id>
    <command>exec ./&apos;%n&apos;</command>
    <description>Execute this file</description>
    <patterns>*</patterns>
    <other-files/>
    <text-files/>
</action>
<action>
    <icon>xterm-color</icon>
    <name>Run in terminal</name>
    <unique-id>yyyyyyyyyyyyyyyy-y</unique-id>
    <command>xterm -T &apos;%n&apos; -e &quot;./&apos;%n&apos;; echo &apos;&apos;; read -p &apos;Press &lt;Enter&gt; to close...&apos;&quot;</command>
    <description>Execute this file in a terminal</description>
    <patterns>*</patterns>
    <other-files/>
    <text-files/>
</action>

No comments: