Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-02-07 23:43:17

yurbev
Member
Registered: 2016-04-18
Posts: 55

Thunar Custom Action - Keep Terminal Open

When running a bash script with Thunar Custom Actions I like to place "xfce4-terminal -x"  in front of the bash script path, which will open the terminal so I can see the bash script performing the operations. But I'd like the terminal to stay open after the bash script completes. How do I do this?

Offline

#2 2019-02-07 23:48:19

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

Re: Thunar Custom Action - Keep Terminal Open

xfce4-terminal -H -x

The "-H" will hold the terminal window open.


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 2019-02-07 23:55:50

yurbev
Member
Registered: 2016-04-18
Posts: 55

Re: Thunar Custom Action - Keep Terminal Open

Thanks for the quick reply ToZ! Not to make you uncomfortable, but of all the mods on all the forums I've ever been on you're the most helpful.

Offline

#4 2019-07-21 04:09:51

boffo
Member
Registered: 2019-07-21
Posts: 1

Re: Thunar Custom Action - Keep Terminal Open

Hi, first post here.

To further add to the above answer:  If you wish, you may also have the terminal open into a functioning shell for further processing.
As an example, to conCATinate a file in terminal from Thunar. Or; if you wish to run multiple commands in succession.

Syntax:

 xfce4-terminal -H -e 'bash -c "cat %n; $SHELL"' 

# please take particular note of the single ' and double " quotation marks. All the desired commands must be within the double quotation marks " " .
To close the bash session, type: exit . This will then drop back to the terminated xfce4-terminal .
If the -H  is omitted, the whole lot will close after typing exit .
However, I am not sure about the correct syntax etiquette about the use of single and double quotation marks, as sometimes they are interchangeable; nor about the use of the semicolon for &&, as both work.

Last edited by boffo (2019-07-21 05:13:12)

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 8 queries executed - Memory usage: 520.88 KiB (Peak: 521.73 KiB) ]