Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup launcher icon (.desktop file) for AMPPS. Tested for elementaryOS freya, but should work with most ubuntu derivates.
#!/usr/bin/env bash
# AMPPS wants to be already in the right working directory
cd /usr/local/ampps;
# And since we're there now, we can use the shorthand to start
./Ampps;
[Desktop Entry]
Version=1.0
Type=Application
Name=AMPPS
Icon=/usr/local/ampps/ampps/softaculous/enduser/themes/default/images/ampps/softaculousampps.png
Exec=ampps
Comment=Web Development Stack of Softaculous
Categories=Development;WebDevelopment;
Terminal=false
#!/usr/bin/env bash
# AMPPS wants root rights, but because the working directory is also important, we need to call another helper script as root
# this is the pkexec variant
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /usr/local/share/amppsbootstrap
# this is the gksudo variant
#gksudo /usr/local/share/amppsbootstrap

Fix/Create AMPPS Launcher icon (.desktop file)

Install AMPPS with default options (at this time of writing there are no options). Expecting it is installed in /usr/local/ampps/*

Since its important to place the new files at specific locations, you need to adapt the filename as requested. All files are owned by root.

ampps_starter: place this file exactly as /usr/local/bin/ampps and make it executable

ampps_bootstrapper: place this file exactly as /usr/local/share/amppsbootstrap and make it executable

ampps_desktop: place this file exactly as /usr/share/applications/ampps.desktop

Profit!

@BassemN

This comment has been minimized.

BassemN commented Apr 7, 2017

Thank you 👍

@Phiph

This comment has been minimized.

Phiph commented Apr 18, 2017

Where can I buy you a beer? This has saved me from installing a different distro!

Thank you 👍

@arvi

This comment has been minimized.

arvi commented Apr 27, 2017

Thank you. It worked for me. :)

@androbiotic

This comment has been minimized.

androbiotic commented Jun 26, 2017

done thank you

@indowebdeveloper

This comment has been minimized.

indowebdeveloper commented Aug 11, 2017

i'm trying but not showing on my applications

@sobujbd

This comment has been minimized.

sobujbd commented Aug 16, 2017

Thanks, its worked for me.

And, it might be helpful.

Create install.sh file touch install.sh then insert these codes.

Install.sh

#!/bin/bash
sudo cp -R -v ampps_starter /usr/local/bin/ampps
sudo cp -R -v ampps_bootstrapper /usr/local/share/amppsbootstrap
sudo cp -R -v ampps_desktop /usr/share/applications/ampps.desktop
sudo chmod -R -v +x /usr/local/bin/ampps
sudo chmod -R -v +x /usr/local/share/amppsbootstrap
echo "AMPPS launcher icon (.desktop file) installation done!"
echo "Press Enter to Close this Window..."
read

Open terminal and run
sudo bash install.sh

@andrewvt

This comment has been minimized.

andrewvt commented Sep 15, 2017

Thanks for this, works great! I like the install.sh too, maybe a pull request to add it to the repository and documentation? Made installing super easy for me.

@skpaul82

This comment has been minimized.

skpaul82 commented Oct 21, 2017

great work (Y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment