Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-09-26 09:47:50

fixit
Member
Registered: 2015-01-19
Posts: 129

This is a thunar custom action. I am trying to get it to show SOLVED

(How do I highlight commands?)

This is a thunar custom action. I am trying to get it to show the full pathname and filename of a highlighted file. This is not working

readlink -f %f > filename_path.txt && geany filename.txt_path && rm filename_fath.txt

This give the filename of a highlighted file.

basename %f > filename.txt && geany filename.txt && rm filename.txt

This works from a terminal

readlink -f sm_scratches.jpg
/home/andy/Downloads/sm_scratches.jpg

Last edited by fixit (2024-09-26 22:22:55)


Ubuntu-Mate 24.04

Offline

#2 2024-09-26 10:29:43

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

Re: This is a thunar custom action. I am trying to get it to show SOLVED

fixit wrote:

(How do I highlight commands?)

Embed the command it code blocks. See https://forum.xfce.org/help.php#bbcode

This is a thunar custom action. I am trying to get it to show the full pathname and filename of a highlighted file. This is not working

readlink -f %f > filename_path.txt && geany filename.txt_path && rm filename_fath.txt

This give the filename of a highlighted file.

basename %f > filename.txt && geany filename.txt && rm filename.txt

This works from a terminal

readlink -f sm_scratches.jpg
/home/andy/Downloads/sm_scratches.jpg

Why not just right-click the file, select Properties, and view the "Link Target" field? If you're trying to edit the file with geany, just double-click or use "Open with"? It will resolve the link for you.


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 ---

Online

#3 2024-09-26 17:56:51

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: This is a thunar custom action. I am trying to get it to show SOLVED

It won't work for what I need. I want the full path with the filename so I copy and paste it.

readlink will do that but I can not get it to work with a thunar custom action.

Last edited by fixit (2024-09-26 17:58:51)


Ubuntu-Mate 24.04

Offline

#4 2024-09-26 18:18:31

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

Re: This is a thunar custom action. I am trying to get it to show SOLVED

What version of Thunar are you running? It works for me once I fix the errors in your filenames of your command.

Instead of:

readlink -f %f > filename_path.txt && geany filename.txt_path && rm filename_fath.txt

...try:

readlink -f %f > filename_path.txt && geany filename_path.txt && rm filename_path.txt

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 ---

Online

#5 2024-09-26 22:10:48

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: This is a thunar custom action. I am trying to get it to show SOLVED

Thanks administrator from Canada.

It works perfect. :-)


Ubuntu-Mate 24.04

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: 535.53 KiB (Peak: 536.38 KiB) ]