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

This question already has an answer here:

Basic Specs - Ubuntu 13.10, Gnome 3 (session fallback), Ambiance theme, Faenza icons.

I recently installed XAMPP, now everytime i want to use the program i have to run the sudo /opt/lampp/lampp start command, im quite new at ubuntu but i know my way around some things and i knew i can make a shell script to start the program when i double click on it, so, i open nano in the terminal and write:

sudo /opt/lampp/lampp start

I save it as "" at my home dir and give it the proper permissions chmod +x and chmod +775 When i double click on it absolutely nothing happens, in order for it to work i have to open a terminal and run the the script there ./

If i have to open the terminal each time i want to run the script then the script it self is worthless (specially when runing the sudo /opt/lampp/lampp start is 1 line of code), is there anyway i can run it on double click?

Thanks in advance, i love this community.

share|improve this question

marked as duplicate by Radu Rădeanu, guntbert, Eric Carvalho, waltinator, Jorge Castro Jan 27 '14 at 21:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

The opening stanza should be


... There isn't a trailing slash.

sudo is also going to want a password every time. You can either:

  • Add an exception to /etc/sudoers
  • Use a graphical sudo equivalent like pkexec or gksudo

I think on balance, just substituting in pkexec is the easiest solution.

share|improve this answer
Thanks @Oli im using the gksudo equivalent, its exactly what i was looking for, the password prompt is not a problem, in fact its better. Im reading about editing the sudoers now. – Minnen Jan 27 '14 at 0:31

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