1

I would like to create a launcher for the XAMPP managing app. The .run file is located in /opt/lampp and can be started via terminal by typing

sudo /opt/lampp/manager-linux-x64.run

I'd rather like to start the manager app from the applications menu and therefore added a XAMPP.desktop file to /usr/share/applications. Content is:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Icon=/opt/lampp/XAMPP.png
Name=XAMPP
Exec=gksudo /opt/lampp/manager-linux-x64.run
Comment=Start XAMPP Control Panel
Name=XAMPP
Comment=Start XAMPP Control Panel

The tutorial at https://elementaryforums.com/index.php?threads/create-a-xampp-launcher-on-the-desktop.1265/ didn't work for me. Although there is a XAMPP link in the applications menu I can only 'add to dock' in the context menu and clicking the link makes absolutely nothing happen.

1

I think you need to change the following value in your *.desktop file in the following:

Terminal=false

You can add icon to the Application Menu, which is in left side of the top panel, manual or with the help of some program.

With program "AppEditor"

enter image description here with this program you can easily edit *.desktop files. For DOWNLOAD click here

Manual

We need to download 'gksu' for running a graphical application with administrative rights. It will prompt and ask for password when we will try to launch the application shortcut. We can install it with the following command:

sudo apt-get install gksu

After that we need to create a .desktop file. We can do that in two locations.

  • Local within user account: ~/.local/share/applications/
  • For all users: /usr/share/applications/

In the file we need to write some properties and the values. Here a example:

[Desktop Entry]
Name=XAMPP
Comment=XAMPP control panel
Type=Application
Icon=/opt/lampp/htdocs/favicon.ico
Exec=gksudo /opt/lampp/manager-linux-x64.run
Terminal=false
NoDisplay=false

After creating the file we need to give it the correct permissions, permissions to execute it. We can do that by going to the one of the two locations first we had to determine.

  • cd ~/.local/share/applications/ or
  • cd /usr/share/applications/

After that we can give the created file the permissions like this, change the <name> completely with the file name:

sudo chmod +x <name>.desktop

in our example that would be

sudo chmod +x xampp.desktop
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.