Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I make a executable java archive run automatically in Ubuntu 12.04 lts? i tried going to the start menu and then clicking on start up applications, but when I restarted my computer to see if it worked, I found that it didn't start the program automatically. if it helps, I want to run minecraft automatically on start up. Please help -dkino14

share|improve this question
    
Tell us how would you open the program from the terminal. –  edwin Aug 6 '13 at 22:00
add comment

1 Answer 1

METHOD 1

sudo mv /minecraftstartscript.sh /etc/init.d/
sudo chmod +x /etc/init.d/minecraftstartscript.sh 
sudo update-rc.d minecraftstartscript.sh defaults 

From Dave at Stack Exchange I do not recommend this for loading minecraft at start. Please note that this creates something that can break your startup if applied inappropriately.

METHOD 2

My recommend method.

You should also look into the scripts that gnome (/home/{username}/.config/autostart) & X server runs to add your

/usr/bin/java /path/to/minecraft

command to.

  1. add the command to run Minecraft to somefilename.desktop as well as a method to verify the network has been properly loaded.
  2. move somefilename.desktop to /home/{username}/.config/autostart/
  3. Profit?
share|improve this answer
add comment

Your Answer

 
discard

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.