Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use

sudo /opt/lampp/lampp start


sudo /opt/lampp/lampp stop

every time in order to start and stop the lampp server installed in my computer.

Is there some way by which I can create an icon on my desktop, so that the above command get executed in terminal simply by clicking on the icon?

Thanks in advance

share|improve this question

Without being clever, you can create two launchers for your desktop to start and stop. If you want to sink more time into this you could write a script for a single launcher to toggle on/off, but I'll leave that up to you.

  1. Load a terminal and run gnome-desktop-item-edit --create-new $HOME/Desktop. If you're using something older than 11.10, you might be able to right click the desktop and just click New Launcher.

  2. Give it a name like "Turn LAMP server Off", select a nice icon, don't worry about the comment.

  3. For the command, you want something like this:

    gksu /opt/lampp/lampp stop
  4. Click OK, test it out and then rinse and repeat for the start version.

share|improve this answer

you can make the sh file of this command. be careful you navigate to the proper directory before writing command in the sh file.

then you can execute sh file.

to execute sh file follow following

Right-click on the file.
Go to Properties. And then the 'Permissions' tab.
Check 'Allow executing file as program'. Say OK.
Now double-click on the file the way you open any other file.
That should run the script in .sh file.

also refer

share|improve this answer
Thanks for the info – Akhil Puthiry Jan 24 '12 at 10:28
can i know why down vote? – Hemant Metalia Jan 24 '12 at 10:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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