Your syntax as such is right. Gnome developers indicate they will remove it, and now advocate using --
to end all options so everything after that is evaluated as a command. That syntax would be gnome-terminal -- /path/to/script.sh
. They, however, forgot that that new syntax prevents you from opening several tabs or windows at once, e.g. to automatically connect to different ssh
servers on startup.
Why you do not see a terminal would suggest that your script releases the terminal prompt as soon as it is started. That could happen if the script launches processes in the background. If you want to keep the terminal open, add a "bash" statement or something else like read -n 1 -s -r -p "Press any key to continue"
. You can add that in the script, or as a second command as in gnome-terminal -- /path/to/script.sh ; bash
.
Another method to achieve that from a startup launcher is not exposed in the user interface: you need to edit the .desktop launcher manually. It is in your .config/autostart
folder. With that method, you only enter the path to the executable script as the command, but indicate that it should be run in a terminal:
...
Exec=/path/to/script.sh
...
Terminal=true
...
With both of the approaches, that terminal will close once the script is terminated.