I have XAMPP installed, it is a PHP/MySQL environment and has a control panel which can be launched using this command:
I want to create a launcher shortcut so it appears in 'Show Applications > All Applications' and in the dock.
In Ubuntu 16.04 Unity I did this using a launcher file in the share/applications folder and worked fine.
I only seem to find instruction on adding this as a 'desktop shortcut' with 18.04, see: https://linuxconfig.org/how-to-create-desktop-shortcut-launcher-on-ubuntu-18-04-bionic-beaver-linux
I have attempted a desktop launcher with this code:
[Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=sudo /opt/lampp/manager-linux-x64.run Name=Test Comment=Test
This creates a file on the desktop, I have set to run as an application in the file properties, upon running it asks if this should be trusted to which I confirm (on a side note - is there a list of these somewhere?) but it does not run.
All the other questions related to this are attempting to use
gksudo (which is deprecated in 18.04),
sudo -H nautilus or
pkexec, which doesn't even run via terminal, this returns:
pkexec env DISPLAY=1 XAUTHORITY=$XAUTHROTIY /opt/lampp/manager-linux-x64.run Unknown Error couldn't connect to display "1"