Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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'm trying to run Minecraft on my GeForce card (with Optimus, bumblebee is installed), but without having to type the command in the console every time I want to open it.

How can I configure bumblebee to always run a program with optirun by default? Will the same method work with a .jar set to launch as an executable as it would with a standard executable?

share|improve this question
Ah, didn't notice that before. Thanks for correcting me, fixed. – Alex Jul 20 '12 at 21:12
up vote 1 down vote accepted

If there is an icon for the program available in the launcher and/or dash you can simply adapt the .desktop file to always use optirun. A simple way to change the respective command line is to use the alacarte tool.

share|improve this answer

There might be more elegant ways to do it, but this is what I did:

-Open GEdit or other text editor

-Type in "optirun [or primusrun] java -jar '[directory of launcher jar, IE "/home/[user]/downloads/minecraft.jar"]"

-save the file as "", to make it an executable script

-right-click the file, go to properties > permissions > check the "allow executing this file as a program"

Now you should be able to right-click the file and click run. I know there's an option in the file manager properties to make the file execute on double-click, but I'm on Kubuntu, and it's a bit different. I don't remember how to change that option it on regular Ubuntu, sorry.

Also, protip, if you're not already using it, use Primusrun instead of Optirun with bumblebee. if primusrun isn't installed, it's just "sudo apt-get install primus". I've noticed some pretty definite speed boosts with it.

share|improve this answer

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.