linuxmint / cinnamon-menus

The cinnamon-menu library
GNU General Public License v2.0
26 stars 20 forks source link

Command to refresh the cinnamon menu from terminal #38

Open charlespax opened 4 years ago

charlespax commented 4 years ago

I'm not sure if the right place for this feature request, but here it goes. I would like a method for refreshing the cinnamon menu from the command line.

In a script I am writing, the Eclipse IDE is installed and the script creates a menu entry. Initially, the menu entry cannot be found. However, the menu entry works great if I log out and log back in or if I restart cinnamon entirely.

If such an option or a good workaround exists I would love to know about it.

Here is the part that creates the menu entry.

if [[ -d ~/.local/share/applications ]]; then
    echo "shortfut dir exists."
else
    mkdir -p ~/.local/share/applications
fi

ECLIPSE=/eclipse/eclipse
ICON=/eclipse/icon.xpm
FULL_PATH=$HOME$ECLIPSE
echo " [Desktop Entry]
Encoding=UTF-8
Name=Eclipse IDE
Comment=Eclipse IDE
Exec=$FULL_PATH
Icon=$HOME$ICON
Terminal=false
Type=Application
Categories=Development;Programming
StartupNotify=false" \
>> ~/.local/share/applications/eclipse.desktop
clefebvre commented 3 years ago

I don't think we should provide such a method. If the menu isn't refreshing that's a bug, either here in cmenus or in cinnamon itself and we should fix it.

mtwebster commented 3 years ago

What version of cinnamon are you on? I can't reproduce this in 4.6. What happens if you run update-desktop-database?