Add Xampp Control Panel to Elementary OS Applications menu

In this previous post we learned how to install Xampp on Elementary OS

After installing Xampp in Elementary OS to launch the Xampp Control Panel we must open a terminal window

and run the command

sudo /opt/lampp/

sudo will ask us for the user’s password and after entering it the Xampp Control Panel window will appear

sudo vim /usr/share/applications/Xampp.desktop

The problem happens if for convenience we want to add the Xampp Control Panel to the Elementary OS Applications menu to be able to launch it without executing any command in the terminal.

In order to add an installed program to this menu, we must create the file with the extension ‘.desktop’ in the following folder: /usr/share/applications

To do that we will create the Xampp.desktop file with any text editor for example:

vim sudo vim /usr/share/applications/Xampp.desktop

inside the file we include the following text:

[Desktop Entry]
Exec=sudo /opt/lampp/
Comment[en_US]=Start XAMPP Control Panel
Comment=Start XAMPP Control Panel

Now if we display the applications menu, the Xampp Control Panel appears

But when we click on the Xampp Control Panel it does not get started

The problem is that when launching it from applications we cannot provide the password to sudo so in the end it does not get started

The simplest solution is to prevent sudo from asking for a password, so we execute it from a terminal

sudo visudo

This sentence will open a configuration document for the «sudo» command.

We must go to the end of the document and as the last line add this one.

username ALL = (ALL) NOPASSWD: ALL

as “username” we write the username with which we have logged in Elementary OS and then we save

Now to the user specified sudo will no longer ask for a password and if we now click on the Applications menu on the Xampp Control Panel it will start up without any problem.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *