Bug#930674: automatically generated menus prevent some applications from running
Jeremy Sowden
jeremy at azazel.net
Wed Jun 19 09:20:13 BST 2019
On 2019-06-18, at 12:26:19 +0200, E. Serradilla wrote:
> Package: wmaker
> Version: 0.95.8-3
>
> automatically generated menus prevent some applications from running,
> e.g. libreoffice will not run complaining that file "%U does not
> exist" and others will open an empty file, e.g. %F.
>
> Looking at the code the XDG menu parser does not strip "%X" arguments
> from Exec entries, I attached a sample patch as a workaround to this
> problem.
Your patch truncates any string value at the first %. I don't think
that's the right way to go.
The comments at the top of the source file read as follows:
* We will only deal with Type == "Application" entries in [Desktop
* Entry] groups. Since there is no passing of file name arguments or
* anything of the sort to applications from the menu, execname is
* determined as follows:
* - If `TryExec' is present, use that;
* - else use `Exec' with any switches stripped
Clearly this is not what the code actually does. The quick hack would
be to change xdg_to_wm() to truncate the command-line at the first
instance of white-space (which is what is done to derive (*wm)->Name
from (*xdg)->Exec or (*xdg)->TryExec); the right thing to do would be to
implement the FDO quoting rules first:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#exec-variables
Doesn't look too hard. I'll put something together.
J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-wmaker-devel/attachments/20190619/7d415fc9/attachment.sig>
More information about the Pkg-wmaker-devel
mailing list