Create a Desktop Application Launcher in addition to,
or instead of, a "Favorite" for Ubuntu 18.04 Nov 22, 2019

See instructions below

#!/bin/bash
#
# This script will make a desktop launcher (shortcut)
# for Ubuntu 18.04 - By Bill Craig (launcher@wrcraig.com)
# Thanks to Lubos Rendek and Abhishek Prakash.
#
#             Instructions
# Copy this script to your home directory as launcher.sh
# Open the file properties and make this script executable
# Open a terminal and enter ./launcher.sh
# Enter your user name and the Application name to create a launcher
#
#              Optional
# Give this script it's own launcher in the gnome desktop. 
# Create any launcher using this script, right click and choose Properties. 
# Make the Command: gnome-terminal -e "./launcher.sh"
# Edit the rest of the launcher as you deem necessary.
# 

clear
echo "LAUNCHER - "
echo
read -p "This script creates a desktop launcher (shortcut) on your desktop,
Press Enter to continue or Ctrl + c to quit" 
echo
echo "Enter your username: " 
read name
echo
echo "Enter the name of the Application: " 
read Application

# See if user exists:
file=/home/$name
if ! test -d $file; 
then 
    read -p "
User $name does not exist,
Press enter to exit" 
    exit
fi

# See if Application startup command is found
location=$(which $Application)
status=$?
if ! test $status -eq 0;
then
    clear
    read -p "
$Application does not exist on this computer. 

To find the actual name of an installed Application, go to the directory usr -> share -> applications. 
You’ll see icons of several Ubuntu applications you have installed here. 
Even if you don’t see the icons, you should see the .desktop files 
that are named as application.desktop. 

Look for the application icon (or its desktop file). When you find it, 
right click and choose properties to find the actual name of the Application. 

You can either use the actual Application name in the script 
        or 
drag-drop the file to the desktop or copy the file (using Ctrl+C shortcut) 
and paste it on the desktop (using Ctrl+V shortcut).
Double click on the launcher, then click on Trust and Launch to initiate the shortcut.

Press enter to exit"
    exit  
fi

# Verify data to continue
echo
echo "Your name= $name"
echo "Application= $Application"
echo "location of Application= $location"
echo
read -p "If this information is correct,
Press Enter to continue or Ctrl + c to quit"
echo

# Exit if file already exists:
file=/home/$name/Desktop/$Application.desktop
if test -f "$file"; then
    read -p "$file 
File already exists,
Press Enter to exit" 
    exit
fi

#create file:
echo "Creating file /home/$name/Desktop/$Application.desktop"
touch /home/$name/Desktop/$Application.desktop

# exit if file cannot be created:
file=/home/$name/Desktop/$Application.desktop
if ! test -f "$file"; 
then 
    read -p "Cannot create the file. Press Enter to exit"
    exit
fi

# Add contents to the file:
echo "#!/usr/bin/env xdg-open" >> /home/$name/Desktop/$Application.desktop
echo "[Desktop Entry]" >> /home/$name/Desktop/$Application.desktop
echo "Version=1.0" >> /home/$name/Desktop/$Application.desktop
echo "Type=Application" >> /home/$name/Desktop/$Application.desktop
echo "Terminal=false" >> /home/$name/Desktop/$Application.desktop
echo "Exec=$location" >> /home/$name/Desktop/$Application.desktop
echo "Name=$Application" >> /home/$name/Desktop/$Application.desktop
echo "Comment=$Application" >> /home/$name/Desktop/$Application.desktop
echo "Icon=" >> /home/$name/Desktop/$Application.desktop

#make executable:
chmod 744 /home/$name/Desktop/$Application.desktop

read -p "File created. 

Double click on the launcher, 
then click on Trust and Launch to initiate the shortcut.

         Get Icons for your Launchers
Do a web search for “icons download”, or similar, and download an appropriate icon
Right click on your Launcher and select Properties
In the Properties window, click on the blank icon and select the image you downloaded

Press Enter to quit"