Menu

#922 LXDE menu doesn't properly handle field codes from "Exec" key

1.2
closed-fixed
libfm (316)
5
2015-06-01
2014-12-19
No

Hi,

The problem occurs, for example, when "Name" key contains spaces and "Exec" key contains %c, like in the following example:
"""
[...]
Name[ru]=Картофельный парень
[...]
Exec=ktuberling -caption %c %u
[...]
"""
In Russian locale, it will be interpretate: run "ktuberling" with caption "Картофельный" and open file with name "парень", so there is an error "Cannot open file".

Replace %c with "%c" is not an option because "%c" is against the freedesktop specification for desktop entry. http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
"Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined."

So the launcher needs to correctly parse the command, maybe by adding quotes just before launching the requested program.

Best regards.

Nico.

Discussion

  • Lonely Stranger

    Lonely Stranger - 2014-12-29

    Ticket moved from /p/lxde/bugs/719/

     
  • Lonely Stranger

    Lonely Stranger - 2014-12-29
    • labels: menu, freedesktop specification --> libfm
    • status: open --> pending-fixed
    • assigned_to: Lonely Stranger
    • Group: --> 1.2
     
  • Lonely Stranger

    Lonely Stranger - 2014-12-29

    Thank you very much for reporting this. This issue should be completely fixed in the libfm GIT sources. Test it when possible, please, and report back if something is still wrong.

     
  • Nicolas Salguero

    Hi,

    In my tests, the problem is solved with the GIT version of libfm.

    Thanks very much.

    Nico.

     
  • Lonely Stranger

    Lonely Stranger - 2015-06-01
    • status: pending-fixed --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel