Really hoping someone can advise on this. I have installed xampp and it works perfectly. I have create a launcher for the app. It works as well. however I have to specify that the launcher for Xampp be used with Terminal, in order to input my password. What I would like to do is bypass the terminal input of my password, so that I can input the password in a pop up like the other apps do.

Bellow is my app launcher content

[Desktop Entry]
Name=Xampp Control Panel
Comment=Start or Stop XAMPP
Exec=sudo /opt/lampp/manager-linux-x64.run

2 Answers 2


Replace sudo in the Exec line with pkexec. In the past, you could have used gksu, but it is no longer available in distros based on ubuntu 18.04.


So I got it working using the below .desktop file:

#!/usr/bin/env xdg-open
[Desktop Entry]
Comment=Start or Stop XAMPP
Name=XAMPP Control Panel
Exec=sh -c "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/lampp/manager-linux-x64.run"
Name[en_US]=XAMPP Control Panel
Comment[en_US]=Start or Stop XAMPP

enter image description here

  • @Selwyn Orren I updated my answer, let me know if it works for you aswell.
    – Vlad
    Commented Oct 31, 2019 at 7:40
  • Works perfectly!!! Wow thanks so, so much Commented Nov 1, 2019 at 7:50
  • 1
    @SelwynOrren glad I could help. Have fun coding!
    – Vlad
    Commented Nov 1, 2019 at 12:52

You don't need to use sudo permissions to execute an app stored on the /opt directory. So changing Exec=sudo /opt/lampp/manager-linux-x64.run with Exec=/opt/lampp/manager-linux-x64.run should work.

You may also need to grant ownership to the current user to that directory in case it was wrongly assigned. You can do that from terminal with sudo chown -R user /opt/lampp/, where user is your username.

  • 1
    Howdy, thanks for that, you may not need sudo permission to run an app in /opt directory, however the xampp launcher app itself does require elevated privileges to to start the servers. Now pkexec itself kind of work in the terminal, it does not work at all in the xampp.desktop file at all. Even when using the Terminal I have to input the file like this to get it to work pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/lampp/manager-linux-x64.run Commented Oct 25, 2019 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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