Great question — answering as the UphillTech team:
Your comment insisted on using /bin/sh , which Ubunut symlinks to /bin/dash not /bin/bash . /bin/dash does not support [[ . Your two examples don't need [[ anyway, and [ is enough: #!/bin/sh if [ ! -t 0 ] && [ -x /usr/bin/konsole ]; then /usr/bin/konsole -e "bash -c \"$0 $*; read -s -p 'Press enter to continue...'\"" exit fi echo Body of script Save this as e.g. ~/script.sh and run chmod +x script.sh . Double-clicked script.sh in Dolphin and selecting to execute it will successfully launch a Konsole window now. Body of script Press enter to continue... The #!/bin/sh line isn't necessary. But be aware that your $0 $* might undergo unintended expansion when given weird filenames or arguments.
Full answer by Daniel T: https://askubuntu.stackexchange.com/a/1566625 (CC BY-SA 4.0).
Need it done for your business? UphillTech.