The following is usable in my case, launching a shell script from a launcher, and keeps the shell window open.
Method
- This example is with
mate-terminal
, use gnome-terminal
if it's the one on your system.
- This example is with a php cli shell script, to get the idea, any command can be passed here.
- One parameter is passed to the script,
-h
on this case.
Adding ; bash
keeps the shell window open after the end of the script, for e.g.:
mate-terminal --execute bash -c "php /home/lilith/Desktop/moon/MOON/moon -h ; bash"
Additional variations
To keep the window open, with the path set on the script's directory, use a cd
before the command. For e.g.:
mate-terminal --execute bash -c "cd /home/lilith/Desktop/moon/MOON/ && php moon -h ; bash"
This allows the launching of some additional commands without having to to remain in the current working directory.