[openbox] menu not recognized

Marcus Schätzle kickshaw22 at gmail.com
Sun Jul 12 22:51:42 EDT 2020


(resending, as my replay did originally only go to the OP)

I see now that Openbox accepts something like this:

<?xml version="1.0" encoding="utf-8"?>

<openbox_menu>

<menu id="root-menu" label="menu test">
    <item label="proof it works">
        <action name="Execute">
            <command>xmessage Hello</command>
            <startupnotify>
                <enabled>yes</enabled>
            </startupnotify>
        </action>
    </item>

</openbox_menu>

Nevertheless, that XML put into an XML-validator results in this message:
16: 3 The element type "menu" must be terminated by the matching end-tag
"</menu>"

Adding the </menu> closing tag will result in fixing that inside the
validator.

I'd certainly not omit the closing tag to avoid unexpected problems.

Am Mo., 13. Juli 2020 um 02:20 Uhr schrieb Philip Mundhenk <
philip.mundhenk at protonmail.ch>:

> "- the menu id has to be "root-menu" instead of "menu_test"."
> That would seem to conflict with the main application menu, the one that
> comes installed by default, mousebound to a right or left click on the root
> window [I forget which is default - it's right in my case but I may have
> swapped the binding with the client-list-combined-menu which is also
> present by default out-of-the-box].  AFAIK, 2 or more menus with the same
> id makes no sense. All of my menus have unique id strings. The others all
> work fine when elicited with the key or mouse binding set in
> ~/.config/openbox/rc.xml. I don't see your point.
>
> "- the closing </menu> tag is missing between </item> and <openbox_menu>"
>
> The lines
> <menu id="menu_test" label="menu test">
> and
> </openbox_menu>
> constitute an opening and closing pair, do they not? I've got half a dozen
> working menus that use that same syntax.
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Sunday, July 12, 2020 10:58 PM, Marcus Schätzle <kickshaw22 at gmail.com>
> wrote:
>
> Your example menu has two issues:
> - the closing </menu> tag is missing between </item> and <openbox_menu>
> - the menu id has to be "root-menu" instead of "menu_test".
>
> If these two changes are applied, the item shows up.
>
> Am So., 12. Juli 2020 um 23:37 Uhr schrieb Philip Mundhenk <
> philip.mundhenk at protonmail.ch>:
>
>> I have file
>> ~/.config/openbox/menu_test.xml
>>
>> which contains what's between the #######s:
>> ##########################################################################
>> <?xml version="1.0" encoding="utf-8"?>
>> <openbox_menu xmlns="http://openbox.org/" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>> http://openbox.org/                 file:///usr/share/openbox/menu.xsd">
>>     <menu id="menu_test" label="menu test">
>>
>>   <item label="proof it works">
>>     <action name="Execute">
>>       <command>xmessage Hello</command>
>>       <startupnotify>
>>         <enabled>yes</enabled>
>>       </startupnotify>
>>     </action>
>>   </item>
>>
>> </openbox_menu>
>> ##########################################################################
>> or here, if you prefer:
>> https://pastebin.com/R7VqSqRQ
>> per stat: Access: (0777/-rwxrwxrwx)
>> so perms shouldn't be the issue.
>>
>>
>> But when I attempt to invoke it, I get a zenity-like box with the title
>> "Openbox" and the error message:
>>
>> Attempted to access menu "menu_test" but it does not exist
>>
>> I can't see anything weird about the file. It has an extra newline at the
>> end per linux conventions. Except for the id and label values, which are
>> unique, it has the same header as other menus located in the same
>> directory. They work fine. Is there some low limit to the number of menus I
>> can define?
>>
>> This is under pclos, the plain Openbox version. It's in the Mandrake
>> family of distros and nobody at that forum has any ideas.
>>
>> Sent with ProtonMail <https://protonmail.com> Secure Email.
>>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20200713/1a28ec97/attachment-0001.htm>


More information about the openbox mailing list