You can create a .desktop file to provide instant access to the XAMPP control panel. Irrespective of whether you use Unity, GNOME, KDE, LXDE, Xfce4 or another desktop environment, you more than likely have access to a directory located at ~/.local/share/applications for installation of .desktop files. This covers the major graphical Ubuntu distributions. If your distribution places launchers somewhere else, simply modify these directions to point it at the right place.

Method 1: Create a .desktop File fo ther XAMPP Control Panel

Open up a terminal by holding down CTRL, ALT and T, and then type gedit ~/.local/share/applications/xampp-control-panel.desktop to create a new file. If you’re using Lubuntu you’ll need to replace gedit with leafpad, and Xubuntu users will want to use mousepad instead. You could also use vi or nano regardless of which Ubuntu or other Linux configuration you’re dealing with. When you’re in your chosen text editor, put the following code into the new file:

Comment=Start or Stop XAMPP Name=XAMPP Control Panel Exec=gksu “python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py” Icon[en_US]=/usr/share/icons/Humanity/devices/24/network-wired.svg Encoding=UTF-8 Terminal=false Name[en_US]=XAMPP Control Panel Comment[en_US]=Start or Stop XAMPP Type=Application Icon=/opt/lampp/htdocs/favicon.ico Hold down CTRL and hit S to save the file, or save it from the drop-down file menu. Close the text editor, but keep in mind that you might have to go back to it later. Now issue the command sudo chmod +x  ~/.local/share/applications/xampp-control-panel.desktop to make it executable.

Head over to Dash and try launching it, or if you’re not using Unity check it with whatever applications launch or desktop icon system you’re using. More than likely you’ll be asked for your password when you start it.

Method 2: Ironing Out Wrinkles in XAMPP

If everything worked, then you don’t need to proceed. Sometimes nothing will happen after creating a file like this. If that’s the case, then try running gksu python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py from the CLI and check any error messages. You might get a message that reads something like “Error importing pygtk2 and pygtk2-libglade,”  which can be fixed by installing python-libglade dependencies. Install them with the sudo apt-get install python-glade2 command. You could also try replacing the control panel Exec line with Exec=sudo -i python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py and see if it then executes. Keep in mind that you don’t have to use these icons either. You can point the Icon= lines to whatever files you’d like. Using a free icon set from the Internet, we could set them to display however we’d like. Consider this example, which includes a dummy mouse cursor from the famous Flatastic, which is free for non-commercial usage.

It’s even possible to point to two separate additional icons. While en_US was used in the example, this could be replaced to match any local language. It might not even be necessary in the coding. Should you ever want to remove XAMPP, you’ll have to remove the icon as well with these commands: sudo rm xampp-control-panel.desktop

Windows 10 Now Has Arch Linux Along With Ubuntu, SUSE And Other Complete Linux…Linux Mint 20 “Ulyana” An All 64-Bit Linux OS Based On Ubuntu 20.04 Stable…How to Create Aliases and Shell Functions on Linux?How to Create a File in Linux How to Create a Linux Launcher for the XAMPP Control Panel - 20How to Create a Linux Launcher for the XAMPP Control Panel - 80How to Create a Linux Launcher for the XAMPP Control Panel - 11