Often you need to make a custom script (for instance connecting via SSH to a machine). Instead of opening the terminal or writing a gnome-terminal command with executed code afterwards, why not optionally allow a script to be opened in Gnome terminal.
You can right-click on a script, and check “Allow executing file as program”, then right-click on the file and click on the “Run as program” entry.
However, you must do this for each file (you can use selection to apply to multiple files at once).
That’s all I know. There may be other ways that I don’t know about.
Unfortunately that doesn’t open in terminal for me. It might open in the background instead.
Even creating a script with:
#!/bin/bash
gnome-terminal
And then enabling the oddly worded “Executable as Program”, nothing appears to happen. Perhaps this feature is broken in my version of Gnome if it works for you?
Sorry: I forgot to test with the development version (flatpak). I don’t have 43.beta but 44.alpha-9fdb61870, and it doesn’t work. If you used the flatpak version, I think it’s because there is no terminal/console access inside a flatpak setting.
gnome-terminal only tells gnome-terminal-server to create a new window and then exits. And the terminal window opened by running the script from nautilus closes once the script finishes (depending on how you configured gnome-terminal).
Yes, I tell it to stay open. But it definitely doesn’t open in terminal unless I explicitly tell it to. “Run as a program” for some reason isn’t.
I’m using 43.beta non-flatpak. I’ve just updated from 43.beta to 43 and it doesn’t work. But at least they fixed a weird issue of multiple windows appearing upon an action.
I have to right click and “run as program” each time. Unless I explicitly make it open with gnome-terminal with the method stated in the first postm
The terminal closes when the script exits. If you want to the terminal to stay open you have to do that yourself. Like put something like this at the end of the script: