I have some scripts that requires input to run.
When I execute them from Thunar, no terminal window is shown, hence there is no way to see that it’s waiting for input.
Is there any way to make thunar execute scripts in terminal windows, or some other way to give the script a window for user input/output?
Thanks. That made the option to run in terminal appear on the action menu.
Is there a way to make it the default action? (the action performed when double clicked)
The only way I can think of is to create a .desktop
file in the ~/.local/share/applications/
directory (see the Arch Wiki for more information on that) and use the command from the linked thread for the Exec
entry.
Exec=xfce4-terminal -e %f --hold
Also
Terminal=true
would be a good idea to place in the .desktop
file.
Give the .desktop
file a proper name, save it and in a terminal window run:
xdg-mime default name_of_file.desktop application/x-executable
(obviously replace name_of_file
with the actual file name)
The last command will make your .desktop
file as the default handler for executable files, like your scripts.
Turns out there was an easier solution to this:
In Thunar, right click on a script file -> open with other application
Scroll down to find Xfce terminal. Select it.
Select “use as default for this kind of file”
Open
I didn’t find any way to include the --hold argument (or any other arguments), but it does show the terminal window and ask for input. If I need the --hold argument, I can live with selecting Run in Terminal from the right click menu.