How to add a shortcut to a command to the Cinnamon menu?

or you could just use the

cinnamon-menu-editor

(Also available by right clicking the start button, selecting configure and Open the menu editor.)


Tip: When adding a custom icon, be careful to locate the icon image somewhere you won't be likely to change in the future.


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 -H 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


Simply create a gnome desktop link and place it in .local/share/applications/ for personal menu links.

Sigh: some installers install their desktop links into .gnome/apps/ so you might want to link them: $ ln -s .gnome/apps/*.desktop .local/share/applications/


As pointed out by @roman-raguet https://askubuntu.com/a/232083/37280 place it into /usr/share/applications for all users

As pointed out by @mockfrog https://askubuntu.com/a/800605/37280 you might create this personal entry by cinnamon-menu-editor graphical tool. Run it with sudo for all-users