In your mail: >From: Mikhael Goikhman <[EMAIL PROTECTED]> >Reply-To: >To: [EMAIL PROTECTED] >Subject: Re: FVWM: Re: [HELP]PipeRead Strange Error Message > >On 16 May 2004 23:06:47 -0400, Parv wrote: > > > > in message <[EMAIL PROTECTED]>, > > wrote [EMAIL PROTECTED] thusly... > > > > > > + I PipeRead `ps x|grep Fvwm|sed -e > > > "s/\\(.*\\)\\/\\(Fvwm[a-zA-Z]\\+\\).*/AddToMenu ModuleList \\2 KillModule > > > \\2/"|sort|uniq` > > > > > > However, the PipeRead command stream is rendered as: > > > ``28876 ? R 0:00 sh -c ps x|grep Fvwm|sed -e > > > "s/\(.*\)\/\(Fvwm[a-zA-Z]\+\).*/AddToMenu ModuleList \2 KillModule > > > \2/"|sort|uniq" > > > > Notice that you are using ``, to execute a command in subshell > > instead of '' which may or may not matter to fvwm. Try with '' or "" > > instead of `` in any case. > > Parv, why not just open FvwmConsole and verify your (wrong) theory? :) > > Ok, let's analyze the situation. Suppose we all have GNU tools and this > command (pasted from the top of this message) indeed generates the menu: > > % ps x|grep Fvwm|sed -e "s/\\(.*\\)\\/\\(Fvwm[a-zA-Z]\\+\\).*/AddToMenu ModuleList \\2 KillModule \\2/"|sort|uniq > > First, the choice of double quotes cause you double backslashes, > this is needless. Rewrite this shell command using a single quote: > > % ps x|grep Fvwm|sed -e 's/\(.*\)\/\(Fvwm[a-zA-Z]\+\).*/AddToMenu ModuleList \2 KillModule \2/'|sort|uniq > > Now, you have 2 choices. First, to try to insert one of these commands > into PipeRead. To do this, you should escape all backslash using another > backspace (or maybe even replace each backslash with 4 backspaces, yes). > Dollars should sometimes be escaped too. You may play with it until you > get it correctly. > > Another (preferable) choice is to create ~/bin/fvwm-menu-mymodulelist > script that contains our single line and just call it: > > + I PipeRead `fvwm-menu-mymodulelist` > > Regards, > Mikhael. > Great tips! But: AddToFunc funcModuleList + I PipeRead `ps x|grep Fvwm|sed -e 's!\\(.*\\)/\\(Fvwm[a-zA-Z]\\+\\).*!AddToMenu ModuleList \\2 KillModule \\2!'|sort -u` already works in the popup menu. I am just confused by the error messages in ~/.xsession-errors: [FVWM][__execute_function]: <<ERROR>> No such command '15958'
Then I try starting 'fvwm -D' for debugging and know that '`ps x|grep Fvwm|sed -e 's!\\(.*\\)/\\(Fvwm[a-zA-Z]\\+\\).*!AddToMenu ModuleList \\2 KillModule \\2!'|sort -u`' is rendered by fvwm as: '15958 ? R 0:00 sh -c ps x|grep Fvwm|sed -e 's!\(.*\)/\(Fvwm[a-zA-Z]\+\).*!AddToMenu ModuleList \2 KillModule \2!'|sort -u' BTW: I am using fvwm-snap-20040516 -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
