You are not logged in.

#1 2009-09-09 09:00:56

mairoo
Member
Registered: 2009-08-28
Posts: 5

[SOLVED] openbox menu command doesn't work with &&

I'm now using openbox-session only.

I'd like to run a program after something was done correctly:

zenity --question && killall openbox

I used "obmenu" and it seems that it fixes & to & correctly in the menu.xml.

However, the previous command "zenity" is run only.

In terminal, there's no problem, but it doesn't work with "command" in openbox menu.


<item label="Exit">
                <action name="Execute">
                    <execute>
                        zenity --question --title="Exit" --text="Are you sure to go back to console?" && killall openbox
                    </execute>
                </action>
            </item>

Please, give me any idea. Thank you.

Last edited by mairoo (2009-09-09 10:06:17)


지금 나 뭐하고 있어?
บ้าๆๆๆๆๆๆๆๆๆๆ อะไรก็ไม่รู้

Offline

#2 2009-09-09 09:07:10

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] openbox menu command doesn't work with &&

I don't know if there is a solution in menu.xml. I got around several problems like this building a small script in my ~/bin and calling this from the menu.

Last edited by bernarcher (2009-09-09 09:07:29)


To know or not to know ...
... the questions remain forever.

Offline

#3 2009-09-09 09:09:29

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: [SOLVED] openbox menu command doesn't work with &&

You'll need to use a shell explicitly:

<execute>
  sh -c 'command1 && command2'
</execute>

Offline

#4 2009-09-09 10:06:58

mairoo
Member
Registered: 2009-08-28
Posts: 5

Re: [SOLVED] openbox menu command doesn't work with &&

hbekel wrote:

You'll need to use a shell explicitly:

<execute>
  sh -c 'command1 && command2'
</execute>

I flagged "solved" thanks to your help. It works good. Thank you.


지금 나 뭐하고 있어?
บ้าๆๆๆๆๆๆๆๆๆๆ อะไรก็ไม่รู้

Offline

Board footer

Powered by FluxBB