Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-01-12 16:30:29

farhadmax69
Member
Registered: 2019-03-20
Posts: 9

custom action doesnt show when selecting multiple files in thunar

hey guys,
the title says every thing.
I have created a custom action in thunar and that is shown when selecting a single file in thunar,
However, when I select multiple files in thunar, I dont see my custom action. What should I do?

Offline

#2 2021-01-12 17:45:06

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

Re: custom action doesnt show when selecting multiple files in thunar

farhadmax69 wrote:

hey guys,
the title says every thing.
I have created a custom action in thunar and that is shown when selecting a single file in thunar,
However, when I select multiple files in thunar, I dont see my custom action. What should I do?

You need to specify a parameter to signify that you want to deal with multiple files:
- %F = the paths to all selected files and directories
- %D = the directories of all selected items
- %N = the filenames of all selected items
See https://docs.xfce.org/xfce/thunar/custom-actions

What exactly are your custom action commands and properties?


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 2021-01-12 19:26:19

farhadmax69
Member
Registered: 2019-03-20
Posts: 9

Re: custom action doesnt show when selecting multiple files in thunar

I have created example1.sh in my home directory and it's content is like this :

#!/bin/bash
echo "First arg: $1"
echo "Second arg: $2"
read

I want to echo the selected file names in terminal.

here is the custom action command ( but it doesnt work):

xfce4-terminal -e /home/farhad/example1.sh %N

Offline

#4 2021-01-13 00:16:07

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

Re: custom action doesnt show when selecting multiple files in thunar

use "-x instead:

xfce4-terminal -x /home/farhad/example1.sh %N

...or enclose in quotes after -e:

xfce4-terminal -e "/home/farhad/example1.sh %N"

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

#5 2021-01-13 12:55:28

farhadmax69
Member
Registered: 2019-03-20
Posts: 9

Re: custom action doesnt show when selecting multiple files in thunar

Thanks, now I have another issue.

I've written an application in java. this is the custom action I've created   xfce4-terminal -H -x java -jar /home/farhad/Desktop/duration.jar %F

(duration.jar calculates the duration of video files)

This works for files which are in my home directory, but it doesn't work on files which are on my desktop.

for example, I have a file.mp4 on my desktop and I want to calculate its duration but  I get error below.

Error: Unable to access jarfile /home/farhad/Desktop/duration.jar 'file.mp4'

Offline

#6 2021-01-13 13:28:51

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

Re: custom action doesnt show when selecting multiple files in thunar

Its hard for me to confirm this without knowing more about the jar file,  but the error message is odd (especially since it works through thunar).

Running something similar here:

xfce4-terminal -H -x /usr/bin/vi %F

...works fine.

What version of Xfce, thunar and xfdesktop are you running?


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

#7 2021-01-13 14:37:53

farhadmax69
Member
Registered: 2019-03-20
Posts: 9

Re: custom action doesnt show when selecting multiple files in thunar

for unknown reason thunar didn't applied custom action settings correctly, I loged out and then logen in to my account and now It works fine. Thanks

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 541.44 KiB (Peak: 542.72 KiB) ]