[openbox] Using | in ob3 menus
matteo.acerbi at aliceposta.it
matteo.acerbi at aliceposta.it
Sat Mar 26 09:30:24 EST 2005
In data Sat, 26 Mar 2005 04:08:21 -0700
mfitzgib <mfitzgib at simla.colostate.edu> scrisse:
> Basically, I'm trying to put this command into my menu:
>
> mpc stats | osd_cat ... etc
>
> I know it runs mpc stats, but it doesn't pipe the output through
> osd_cat. Do I need to do anything special?
i agree with Dave and (Great :-) Mate, you need to tell a shell to do
it... so sh -c "your_command" should be ok for you.
by grepping the sources from the nightly snapshot (i had never done that
before, so i might be wrong) it looks like
g_spawn_command_line_sync() from glibc
is used in menu.c to run the commands associated to the menu entries. it
doesn't behave like a "system()", which would call (see man system) "sh
-c %s"... anyway it can look for the given commands in their path if
these are not specified.
as devhelp and e.g. also [1] suggest, there may be security concerns
anyway with depending on PATH...
what do you openbox-hackers think (about these paranoid fears of mine)?
:-)
well, going to quit talking about things i don't know now...
bye
matteo
[1]:
http://mail.gnome.org/archives/desktop-devel-list/2002-May/msg00775.html
More information about the openbox
mailing list