From: René Genz (liebundartig_at_freenet.de)
Date: Mon Dec 11 2017 - 16:40:27 CST

Hi,

I always end up creating a desktop file for VMD.
The GNU/Linux distribution Fedora is used.
The other day I noticed that in the desktop environment Xfce leaving the the desktop file line "Icon=" empty, the VMD launcher in a Xfce panel will be fully transparent.
Hence, I created a simple icon for VMD.

Attached you will find an archive. It contains a 32x32 px PNG file and the source SVG file created with Inkscape.
Below you can find the Bash commands used to create the desktop file. Maybe this can be adapted to work with the configure script.
Feel free to include it in VMD release.

function funexitcode {
        if [[ $? -ne 0 ]]; then
                echo "ERROR: ${1}; exiting script"
                exit 1
        fi
}

### add icon for desktop file
FILE1="/usr/local/share/icons/VMD.png"
funexitcode "define FILE1"
mkdir -p "$(dirname ${FILE1})"
funexitcode "mkdir $_"
cp "${MPI_INSTALLSCRIPT_PATH}/$(basename "${BASH_SOURCE}")_sw/icon/$(basename ${FILE1})" "${FILE1}"
funexitcode "cp VMD.png $_"

### create menu entry
DIR="/usr/local/share/applications"
funexitcode "define DIR"
FILE="${DIR}/VMD.desktop"
funexitcode "define FILE"
if [[ -e ${FILE} ]]; then
  echo "ERROR: \"${FILE}\" present"
  exit 1
fi
echo "[Desktop Entry]" >> "${FILE}"
echo "Type=Application" >> "${FILE}"
echo "Encoding=UTF-8" >> "${FILE}"
echo "Name=VMD" >> "${FILE}"
echo "Comment=Visual Molecular Dynamics" >> "${FILE}"
echo "Exec=vmd %F" >> "${FILE}"
echo "Icon=${FILE1}" >> "${FILE}"
echo "Terminal=true" >> "${FILE}"
echo "Categories=Science;" >> "${FILE}"
funexitcode "appending text to \"${FILE}\""

-- 
Kind regards,
René