linuxmint / cinnamon-spices-applets

Applets for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
589 stars 501 forks source link

CustomApplicationsMenu@LLOBERA: Placeholders in desktop files #1508

Open sphh opened 6 years ago

sphh commented 6 years ago
 * Applet version/Build date: 2.0
 * Cinnamon version: 3.6.6
 * Distribution: Linux Mint 18.3
 * Graphics hardware *and* driver used

image

Notify author of applet @NikoKrause (because the applet's author is set to None)

Issue I configured the menu to include LibreOffice Calc:

    { "desktopFile":"libreoffice-calc" },

When I click on the LibreOffice Calc menu entry, I get a dialog box, telling me, that /home/<user>/%U does not exist.. The libreoffice-calc.desktop file is the standard file (libreoffice-calc.desktop.tar.gz) and it contains the following line:

Exec=libreoffice --calc %U

The same happens with all desktop files containing placeholders.

Expected behaviour Open the program instead of showing an error message.

Additional information Supplying the command without a placeholder in the "command" key in the json file works well.

Nicolas01 commented 5 years ago

As you noticed, if you use desktopFile, the applet will use the associated desktop file.
The desktop file for libreoffice-calc has the following line:

Exec=libreoffice --calc %U

As %U is not defined it will show you an error the same way as you would execute it in bash.
So you can overwrite the Exec by adding a command:

{"desktopFile":"libreoffice-calc", "command":"libreoffice --calc"}