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.

Is there a utility I can use to add an icon to the Cinnamon menu which runs a user-specified command, and as a bonus, displays a user-specified icon?

specifically I'm trying to add a command to open a virtual machine directly, without having to keep the terminal open.

VirtualBox --startvm <myMachineName> --seamless

works fine with alt-F2, but I'd rather have a short-cut so I don't have to type it out.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

You can create a .desktop file to add your command to the Cinnamon menu.

First , create a little script eg: In your home directory

  • Open your terminal and type:

    gedit /home/user/myvm.sh

  • Type the following:

enter image description here

  • Save the file in your home directory and change the permissions with:

    chmod 775 /home/user/myvm.sh

  • Then you can create a desktop file, in the terminal type:

    cd /usr/share/applications

    sudo gedit myvm.desktop

  • Add the following information:

enter image description here

  • Save the changes and make sure the .desktop has the right permissions, in the terminal type:

    sudo chmod 644 /usr/share/applications/myvm.desktop

You can change the information according to your needs, in this case in the field "Icon" put your path to your custom icon, and this should be visible under the Cinnamon menu in the category "System Tools" with the name "My VM".

enter image description here

If you want, you can add it to your cinnamon panel with right click in the icon "My VM" in the Menu, and then choose "add to panel"

enter image description here

Hope this will be helpful.
Regards.

share|improve this answer
    
beautiful instructions, the screenshots were not needed but very appreciated :) –  ataulm Dec 23 '12 at 16:36

For anyone else looking for a simpler solution, then the following offers a GUI interface for adding custom launchers to your panel:

cd /usr/share/cinnamon/applets/panel-launchers@cinnamon.org/
./cinnamon-add-panel-launcher.py
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.