Bug#930674: automatically generated menus prevent some applications from running
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
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:
Doesn't look too hard. I'll put something together.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Pkg-wmaker-devel