Every time I start or restart my Ubuntu 16, Xampp doesn't start I have start manually by sudo /opt/lampp/lampp start. Making script like sudo nano /etc/init.d/lampp doesn't work command update-rc.d lampp defaults gives me error:

insserv: warning: script 'K01lampp' missing LSB tags and overrides
insserv: warning: script 'lampp' missing LSB tags and overrides
insserv: fopen(.depend.stop): Permission denied

The script File contains the below lines:


/opt/lampp/lampp start]

Any solution?

up vote 0 down vote accepted
    • First move that particular script to /etc/init.d/ Directory

for example

#! /bin/sh
# /etc/init.d/lampp

# Some things that run always
touch /var/lock/lampp

# Carry out specific functions when asked to by the system
case "$1" in
    echo "Starting script lampp "
    echo "Could do more here"
    echo "Stopping script lampp"
    echo "Could do more here"
    echo "Usage: /etc/init.d/lampp {start|stop}"
    exit 1

exit 0

Once you've saved your file into the correct location make sure that it's executable by running "chmod 755 /etc/init.d/lampp".

Then you need to add the appropriate symbolic links to cause the script to be executed when the system goes down, or comes up.

*it's this way

root@root:~# update-rc.d lampp defaults

2.Do it using GUI

  • STARTUP APPLICATIONenter image description here
  • I tried making a symbolic link but gives me error: ln: failed to create symbolic link '/opt/lampp/lampp': File exists – Adarsh Hiwrale Jan 11 '17 at 5:12
  • The file which i have made is in /etc/init.d/lampp and the original file is in /opt/lampp/lampp . – Adarsh Hiwrale Jan 11 '17 at 5:13
  • /opt/lampp/lampp this the main file which i use to start xampp sudo /opt/lampp/lampp start – Adarsh Hiwrale Jan 11 '17 at 12:46
  • Try my answer below. That should be much more easy. – Muhammad bin Yusrat Mar 7 '17 at 11:17

My solution is rather simple.

Simply open terminal and write

sudo gedit /etc/rc.local

And then add these 2 lines just before the last line

cd /opt/lampp/
sudo ./lampp start

And that's it. Simply save and restart the computer. Please note that these lines should be above the last line that says exit 0

I hope it helps someone else.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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