I'm also running into this issue when the .sh file is located in a folder that has an apostrophe or space, even if the .sh file itself does not; e.g.
Code: Select all
/folder's_name/script.sh
Code: Select all
/folder name/script.sh
And yes, the "run as a program" checkbox in right-click -> properties is checked.
For reference, this issue does not occur with Mint 20.3 Cinnamon (I have not tried it on Mate). I've also not tried it on any other XFCE version of Mint other than 20.3.
EDIT: To clarify, all I'm trying to do is double-click on the .sh file through Thunar on XFCE. In Nemo on Cinnamon, it all "just works" regardless of whether there's a space or an apostrophe but, in Thunar on XFCE, it does not (it may be worth mentioning that Thunar on XFCE was by default set to open .sh files with the text editor even when "run as a program" was checked, so I had to set .sh files to instead open with the terminal by default so that double-clicking on them would actually run them).
Simply renaming the file name to not have a space or apostrophe makes it work fine, but a least one program I was trying to run has an apostrophe in its .sh file by default (and renaming it causes issues with the .py file that it normally hooks into using the same file name).
All tests were conducted with the .sh file being located in "Home" and/or on the desktop, and additionally were tested inside of a newly-created folder in those locations.
If you want an example .sh script that I tested with, here's one I "borrowed" from this thread; a file name of:
Code: Select all
hello world.sh
Code: Select all
world's hello.sh
Code: Select all
hello_world.sh
Code: Select all
#!/bin/bash
# hello world script!
echo 'hello world'
read -n 1 -r -s -p $'Press any key to continue...\n'