While setting up my development environment on Ubuntu, I successfully installed XAMPP to streamline my local web development. However, I was surprised that XAMPP didn’t automatically appear in the start menu. Determined to simplify access, I dug into the problem. Eventually, I figured out how to manually create a shortcut for XAMPP in the start menu, making it much more convenient to launch and manage the application.
Here’s a step-by-step guide on how to create this shortcut:
Step 1. Install a text editor (Nano)
If you already have a terminal-based text editor then skip this point. Otherwise, install one. I’m using nano
you can install it by running this simple command.
sudo apt update
sudo apt install nano
Step 2. Create the Desktop Entry File
First, open a terminal by pressing CTRL + ALT + T. Then, create a new .desktop
file with the following command:
sudo touch xampp.desktop
Step 3. Open xampp.desktop file with admin right
Now, open the xampp.desktop file with admin right by using this command.
sudo nano /usr/share/applications/XAMPP.desktop
Step 4. Add the Necessary Entries
Copy and paste the following code into the file. This code specifies the properties of the desktop entry, including the name, comment, executable path, and icon:
[Desktop Entry]
Encoding=UTF-8
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=sudo /opt/lampp/manager-linux-x64.run
Icon=/opt/lampp/htdocs/favicon.ico
Categories=Application
Type=Application
Terminal=true
Step 5. Save and Exit
Save the file by pressing CTRL + X, then Y, and hit Enter to confirm.
Congratulations, you have successfully created the XAMPP shortcut in the start menu. 😊