Xfce Forum

Sub domains
 

You are not logged in.

#1 2026-04-21 10:05:04

MitraMai
Member
Registered: 2019-10-02
Posts: 11
LinuxFirefox 140.0

[Solved] Can't get Thunar Custom Action to work, with one-liner

Hello!

I'm trying to get this one-liner to work in a custom action, in Thunar:

for f in *.xlsx; do  /home/martin/.local/share/pipx/venvs/ofxstatement-handelsbanken/bin/ofxstatement convert -t handelsbanken "$f" "${f%.xlsx}.ofx" ; done

What it does is that it calls a program that I installed with pipx, and converts xlsx-files to ofx-files (pretty obvious big_smile)
Running it in a terminal works just fine, it converts all the .xlsx-files into .ofx-files.
When highlighting a file with an .xlsx-extension the action shows up, but clicking it does nothing.

Under "Appearance Conditions" I've the following patterns:
File pattern: *.xlsx
Appears if selection contains: Other Files

Is there something that I'm missing here?
Could it be that it is a python-program?

Regards

M

Last edited by MitraMai (2026-04-21 20:43:50)

Offline

#2 2026-04-21 12:13:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,598
LinuxFirefox 149.0

Re: [Solved] Can't get Thunar Custom Action to work, with one-liner

The command interpreter used by custom actions isn't a complete shell, so special characters will throw it off. To get around this, just run the command through a sub-shell in the custom action:

sh -c 'for f in *.xlsx; do  /home/martin/.local/share/pipx/venvs/ofxstatement-handelsbanken/bin/ofxstatement convert -t handelsbanken "$f" "${f%.xlsx}.ofx" ; done'

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#3 2026-04-21 20:44:21

MitraMai
Member
Registered: 2019-10-02
Posts: 11
AndroidFirefox 149.0

Re: [Solved] Can't get Thunar Custom Action to work, with one-liner

Thanks! That did the trick!

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 523.88 KiB (Peak: 524.86 KiB) ]