Thanks for the help. Indeed, I am using the standard Trisquel DE, gnome 3 fallback mode.I just right clicked the script file, permissions, allow this to be run as executable. But I can only execute it from the terminal.
If i double click it or try to use it from a launcher, it opens in gedit.