You are not logged in.

#1 2018-09-24 13:17:31

shake
Member
Registered: 2018-03-14
Posts: 6

openbox:invaild output from pipe-menu "xdg_menu --format ...

I use openbox with archlinux-xdg-menu as pipe menu. And I got an error information "openbox invaild output from pipe-menu "xdg_menu --format openbox3-pipe --root-menu /etc/xdg/menus/arch-applications.menu"" just when I was trying to open that pipe menu yesterday.

Then I found that it was the following code in ~/.xdg_menu_cache/output leading to the error.

   <item label="Battle for Wesnoth" icon="/usr/share/icons/hicolor/16x16/apps/wesnoth-icon.png">
      <action name="Execute"><execute>sh -c "wesnoth >/dev/null 2>&1"</execute></action>
   </item>

Where wesnoth is a game.
I just wonder why this command: sh -c "wesnoth >/dev/null 2>&1" in <execute> leads the error. It worked fine just putting in terminal directly. And if I rm "2>&1", the error won't happen.

Last edited by shake (2018-09-25 05:37:48)

Offline

#2 2018-09-24 17:59:59

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: openbox:invaild output from pipe-menu "xdg_menu --format ...

Sounds like a misconfigured xml check in ~/.config/openbox failing that create a shell script with command and have that execute

Last edited by cirrus (2018-09-24 18:04:07)

Offline

#3 2018-09-24 18:11:18

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: openbox:invaild output from pipe-menu "xdg_menu --format ...

http://openbox.org/wiki/Help:Actions#Execute

OpenBox wiki wrote:

Also, the & character must be written as &amp; in order to be parsed correctly. <execute> is a deprecated name for <command>.

Offline

#4 2018-09-25 05:20:36

shake
Member
Registered: 2018-03-14
Posts: 6

Re: openbox:invaild output from pipe-menu "xdg_menu --format ...

2ManyDogs wrote:

http://openbox.org/wiki/Help:Actions#Execute

OpenBox wiki wrote:

Also, the & character must be written as &amp; in order to be parsed correctly. <execute> is a deprecated name for <command>.

Thx a lot. It's very helpful.

Offline

#5 2018-09-25 05:37:22

shake
Member
Registered: 2018-03-14
Posts: 6

Re: openbox:invaild output from pipe-menu "xdg_menu --format ...

The problem is solved. However, I still have a question. Why "xdg_menu --format openbox3-pipe --root-menu /etc/xdg/menus/arch-applications.menu" gave me a wrong output including the characters "2>&1", instead of "2>&amp;1" ?
I don't want to edit the output file manually. Is that possible to let xdg_menu command automatically output the correct character? What should I do for this purpose?

Offline

Board footer

Powered by FluxBB