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.

all. I have a question that has been bugging me recently.. Say I install Blender.. I am using the Bumblebee project thing, so in order to properly use it, I have to go to the terminal and type "optirun blender". If I just click on the icon on the dash, it will run without the proper parameter being passed. Is there a way I could customize the Blender launcher on the dash so it would always launch it with the optirun parameter?

Thanks.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

You can copy the blender.desktop out of /usr/share/applications, and into your ~/.local/share/applications directory, and edit it there to have a different command line. Don't edit the one in /usr/share/applications, as package updates will revert your changes.

share|improve this answer
    
Yeah. thanks, that did the trick. =D –  gustavokrm Mar 22 '12 at 17:24

You could edit its launcher. The launcher configurations sit in /usr/share/applications so you can run sudoedit /usr/share/applications/blender.desktop and change its Exec statement so you end up with something like this:

[Desktop Entry]
Name=Blender
GenericName=3D modeller
GenericName[es]=modelador 3D
GenericName[de]=3D Modellierer
GenericName[fr]=modeleur 3D
GenericName[ru]=Редактор 3D-моделей
Comment=3D modeling, animation, rendering and post-production
Comment[es]=modelado 3D, animación, renderizado y post-producción
Exec=optirun blender
Icon=blender
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;
MimeType=application/x-blender;

As dobey suggests, you can also make changes in the user ~/.local/share/applications directory. This will make the change for only this user, instead of globally (if you have a multi-user system). Keeping a copy of your changes locally is a good idea if you'd like to make them more upgrade-proof. Be aware that changes in the local directory won't automatically reflect changes made by upgrades to the main configuration file (for example, arguments to Exec).

share|improve this answer
    
This however is a bad idea, as any changes to this file will be lost when the package is upgraded. You should follow the advice in my answer to copy it to ~/.local/share/applications first, to avoid it breaking on upgrade. –  dobey Mar 22 '12 at 17:03

You can use Alacarte

sudo apt-get install alacarte

Run it by typing in terminal

alacarte

Find your application in appropriate category or add new one and specify command for launching and custom icon.

Now you can type your application name in dash and launch in with desired parameters.

share|improve this answer

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.