Add menu entry for XAMPP in Linux
Creating new menu items in Linux Mint is very easy as long you know how to do it. Here is a simple way of creating a menu item for Xampp on Linux Mint. Xampp by default does not create any menu item.
Create a file
nano ~/.local/share/applications/xampp-control-panel.desktop
If the location does not exists then use [c]mkdir[/c] to create the folders. [c]/home/[USER_NAME]/.local/share/applications [/c]
**Paste the following **
[Desktop Entry]
Name=XAMPP Control Panel
Comment=Start/Stop XAMPP
Exec=gksudo /opt/lampp/manager-linux-x64.run
Icon=/opt/lampp/xampp_logo.svg
Terminal=false
Type=Application
Categories=Development;
[attachment=0]XAMPP-control-panel-alternative.png[/attachment]
Alternative Xampp Control Panel
This is another control panel for xampp. To add this to the menu simply replace the content of xampp-panel.desktop or create a new one to have both on them on the menu.
[Desktop Entry]
Name=XAMPP Control Panel
Comment=Start/Stop XAMPP
Exec=gksudo /opt/lampp/share/xampp-control-panel/xampp-control-panel.py
Icon=/opt/lampp/xampp_logo.svg
Terminal=false
Type=Application
Categories=Development;
[attachment=1]XAMPP-Control-Panel.jpg[/attachment]
Download the logo from here https://www.apachefriends.org, just do a save as and copy it to [c]/opt/lampp[/c]
~~ If gksudo is not working:~~ ~~ sudo apt install gksu~~
Update: Must Follow
**gksudo has been depreciated and removed form most linux distributions **. So we will create an alias for [c]gksudo[/c] using [c]pkexec[/c].
sudo nano /usr/local/bin/gksudo
paste the following
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $@
Make sure it has the proper permission
sudo chmod 755 /usr/local/bin/gksudo
If the control panel does not run then try running it from terminal and post the error message here.
Error
Error importing pygtk2 and pygtk2-libglade
Solution
**Install **[c]python-libglade [/c]
sudo apt install python-glade2
*On Debian 9 RC3. I also had to install [c]python-glade2[/c] as it was not installed by default. *
0 Comments