I read about making desktop launchers here.
I have already successfully made some launchers for my little Python programs.
I have a program called Formreturn, for making and marking multiple choice forms. It is great, and nowadays free from github. (I paid $600 for it back then, but it was worth it for me.)
For some reason, after installing the latest version, the desktop icon does not install, I have to start it from bash:
pedro@pedro-512ssd:~/Formreturn$ ./formreturn.sh
The program starts OK.
I spoke to Roland Quast, the author, about this, but he did not have a good solution. He blamed changes in Ubuntu.
So I thought I could make my own launcher:
[Desktop Entry]
Version=1.0
Name=Formreturn
Comment=Multi-choice marking programme
Exec=/home/pedro/Formreturn/formreturn.sh
Icon=/home/pedro/icons/formreturn.png
Terminal=false
Type=Application
Categories=Utility;Application;
I also tried with:
Terminal=true
But it does not launch!! Maybe because it is a bash script??
Any ideas what is wrong??
If you look at the attached picture, you will see what I see when I right click the launcher FR1. It has an extra tab "Open with".
If I right click my other home-made launchers, the ones for my Python programs, I don't see that, they just have 2 tabs: "Basic" and "Permissions"
Maybe this is some security feature??
EDIT: This is formreturn.sh
#!/bin/bash
# (I commented this out with #) FRM_HOME=.
FRM_HOME="/home/pedro/Formreturn/"
COMMAND_PATH=`echo ${0} | sed -e "s/\(.*\)\/.*$/\1/g"`
cd ${COMMAND_PATH}
if [ -z $JAVA_HOME ]; then
JAVA_COMMAND=`which java`
if [ "$?" = "1" ]; then
echo "No executable java found. Please set JAVA_HOME variable."
exit
fi
else
JAVA_COMMAND=$JAVA_HOME/bin/java
fi
if [ ! -x $JAVA_COMMAND ]; then
echo "$JAVA_COMMAND is not executable. Please check the permissions."
exit
fi
$JAVA_COMMAND -jar -Xmx1024m $FRM_HOME/lib/formreturn.jar "$1"