Summary: How to set Run in Terminal
as the default Nautilus doubleclick action?
I wish to run an interactive script by doubleclicking it. To interact with it, I have to see it run.
If I gsettings
set org.gnome.nautilus.preferences executable-text-activation
to ask
, then it gives me a choice; Run in Terminal
does what I want; Run
doesn't, since when the script needs to ask me something, it just hangs. However, I don't want to have to click the Run in Terminal
every time. I want it to do that by default. I've done it before somehow.
I tried to gsettings
set org.gnome.nautilus.preferences executable-text-activation
to launch
; however, that simply does Run
as the default; I don't see a way to make it Run in Terminal
by default.
I have also tried inserting a gnome-terminal
command. This successfully pops up a terminal window (even when simply Run
); however, I then somehow need to send all the commands to that terminal window.
Alternatively, I know how to send (just) the interactive portion of the script to that terminal, which would work for me; however, in that case I need the script to halt until the interactive portion of it finishes, and then resume the execution. Typically, this can be accomplished using the wait
command; as is, the gnome-terminal
command seems to work as gnome-terminal&
instead, in that it relinquishes control to the bash script as soon as it is launched.
I've read through almost 10 duplicates of the thread How do I run executable scripts in Nautilus? (including other sites), and still cannot find my answer. Any other workarounds will be appreciated.
zenity
oryad
to prompt in GUI format. If you are unsure post your script contents in a "how do I"... question and some one will modify it for you in an answer.yad
on my system.