Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-09-16 10:59:35

asterix
Member
Registered: 2025-09-15
Posts: 10
UnknownOpera 95.0

[SOLVED] Create a custom action for Thunar to copy filename/filepath

I need to create two custom actions in Thunar. First is to copy the filename, including extension if any, to the clipboard. The second one is to copy the full absolute path of the selected item from the root, "/" to the clipboard.

I had a look at the post in the forum, but could not get it to make it to work.

How can I create these two custom actions in Thunar? All help and suggestions would be welcome.

Last edited by asterix (2025-09-17 03:09:33)

Offline

#2 2025-09-16 12:50:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,304
LinuxFirefox 142.0

Re: [SOLVED] Create a custom action for Thunar to copy filename/filepath

The script in the link will work - make sure the script is executable and you have selected all options on the appearance tab.

Here are a couple of alternatives that don't require a separate script - just put these commands in the command entry.

Filename to Clipboard

basename %f | xclip -selection clipboard

Path to clipboard

echo %f | xclip -selection clipboard

On the Appearance tab, select all options for all files. Note that this will only process one selected file at a time. Also make sure xclip is installed.


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

Offline

#3 2025-09-16 13:59:32

asterix
Member
Registered: 2025-09-15
Posts: 10
UnknownOpera 95.0

Re: [SOLVED] Create a custom action for Thunar to copy filename/filepath

I have xfce4-clipman and not xclip. Will it be possible for this to be done with xfce4-clipman? it appears that xclip is part of the xfce4-clipman package.

Offline

#4 2025-09-16 16:03:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,304
LinuxFirefox 142.0

Re: [SOLVED] Create a custom action for Thunar to copy filename/filepath

xclip is a separate package. xfce4-clipman doesn't have an interface/api like xclip to do this from within thunar's custom actions.


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

Offline

#5 2025-09-17 03:06:08

asterix
Member
Registered: 2025-09-15
Posts: 10
UnknownOpera 95.0

Re: [SOLVED] Create a custom action for Thunar to copy filename/filepath

Thanks that worked. I installed the xclip package and configured the two custom actions.

There ought to be a package available, which will make these custom actions for Thunar available.

Offline

#6 2025-09-17 09:50:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,304
LinuxFirefox 142.0

Re: [SOLVED] Create a custom action for Thunar to copy filename/filepath

https://gitlab.xfce.org/xfce/thunar/-/issues/245.

This wiki page exists that lists a number of custom actions that can be used.


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

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 562.64 KiB (Peak: 563.48 KiB) ]