They will only open in a text editor. "Open With" doesn't offer an option to execute. The shell scripts are +x so they should run normally.
As a workaround, I set them to be opened with the terminal emulator, but it is not ideal.
They will only open in a text editor. "Open With" doesn't offer an option to execute. The shell scripts are +x so they should run normally.
As a workaround, I set them to be opened with the terminal emulator, but it is not ideal.
Even when marked as executable, the system doesn't know what to use to interpret the script. If it is a POSIX shell script, add this line to the very beginning of your script:
#!/bin/sh
Should it require bash or some other shell, use e.g. for bash
#!/bin/bash
The same applies to other executable text files, such as python programs:
#!/usr/bin/python
.sh
files execute on double click without a terminal window by right click on a file -> Open With Other Application -> Use custom command -> type "bash" in the input field then tick "Use as default for this kind of file", and press "Open" – Klesun Nov 30 '19 at 17:40