Subject: FVWM: a couple little things

From: Dave Lane <[email-masked]>
Date: Thu, 28 Sep 1995 10:25:28 +1000 (GMT+1000)

Hello,

I just recently subscribed to this list, so please forgive me if these 
questions have already been asked ad nauseam.  I just upgraded to version 
2.0.27 (I think).  Anyway, I converted my .fvwmrc (version 1.24) to the 
new format (using a script provided by Martin Kraemer and Grant McDorman) 
and things went fairly well with a couple small exceptions.  

1.  my FvwmButtons (formerly GoodStuff) and some menu items no longer 
launch things like they did in version 1.24.  When I hit a button defined 
as follows in my .fvwmrc

*FvwmButtons XEmacs emacs.xpm Exec "" (cd /usr/khoros/res/tg; xemacs &)

I get the following error:  

/bin/sh: syntax error near unexpected token `(cd'
/bin/sh: -c: line 1: `"" (cd /usr/khoros/res/tg; xemacs & )

This used to work no problem.  A similarly defined menu item also has 
problems:

AddToMenu "Editors" "Text..." Title
+              "Xemacs" Exec exec "(cd /usr/khoros/res/tg; xemacs &)" 

results in 

exec: /var/X11R6/lib/fvwm-2.0/fvwm/(cd /usr/khoros/res/tg; xemacs &): 
cannot execute: No such file or directory

Why does the path get prepended to the command?  Is that a flag in a 
Makefile or configure file that I screwed up somewhere?  

2.  Whenever I restart FVWM (this happened with version 1.24 as well) I get 
the following X error:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  25 (X_SendEvent)
  Resource id in failed request:  0x2800003
  Serial number of failed request:  157
  Current serial number in output stream:  158

the serial numbers change (though are sometimes the same two or three 
times in a row) but the other stuff is the same.  I have no idea what 
window could be causing this.  

3.  Finally, is there any way to get icons to align themselves on their
text (ie not on the pixmaps)?  I have pixmaps of slightly varying sizes,
and they end up being all over the place as they appear to be aligned on
their top edge. 

That's all for now...  Thanks in advance for any suggestions.  
Cheers,

Dave

+=========================================================================+    
|    Dave Lane                                  [email-masked]       |
|    NZ Forest Research Inst.                                             |
|    Dept. of Natural Resource Engineering                                |
|    Lincoln University                         Wk: +64 3 325 2811 x8794  |  
|    P.O. Box 84                                Hm:       343 3192        |  
|    Lincoln, NZ                                Fx:       325 3845        |  
+=========================================================================+  

--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mark Borges <[email-masked]>
Date: Wed, 27 Sep 1995 17:19:46 -0600

>> Dave Lane(DL) wrote on Thu, 28 Sep 1995 10:25:28 +1000 (GMT+1000):

DL> 2.0.27 (I think).  Anyway, I converted my .fvwmrc (version 1.24) to the 

2.0pl35 is the latest.

DL> *FvwmButtons XEmacs emacs.xpm Exec "" (cd /usr/khoros/res/tg; xemacs &)

DL> I get the following error:  
DL> /bin/sh: syntax error near unexpected token `(cd'
DL> /bin/sh: -c: line 1: `"" (cd /usr/khoros/res/tg; xemacs & )

This looks like a bug. I have a similar line

*FvwmButtons Rossby xterm2.xbm Exec "rossby" rxx rossby -n rossby &

that works fine in pl35. rxx is a perl script, but it appears fvwm is
trying to pass your line to /bin/sh and munging it by picking up the
"" as part of the shell command line. Anyway, upgrading (if you really
are at pl27) might fix things.

DL> AddToMenu "Editors" "Text..." Title
DL> +              "Xemacs" Exec exec "(cd /usr/khoros/res/tg; xemacs &)" 

DL> results in 
DL> exec: /var/X11R6/lib/fvwm-2.0/fvwm/(cd /usr/khoros/res/tg; xemacs &): 
DL> cannot execute: No such file or directory

DL> Why does the path get prepended to the command?

This looks like fvwm is searching for a module to launch.

DL> 2.  Whenever I restart FVWM (this happened with version 1.24 as well) I get 
DL> the following X error:

DL> X Error of failed request:  BadWindow (invalid Window parameter)
DL>   Major opcode of failed request:  25 (X_SendEvent)
DL>   Resource id in failed request:  0x2800003
DL>   Serial number of failed request:  157
DL>   Current serial number in output stream:  158

This, I'm almost positive (Chuck?) is caused by a bug in XEmacs-19.13,
and not at all fvwm's fault. Do you still see it when XEmacs is not
running?

DL> 3.  Finally, is there any way to get icons to align themselves on their
DL> text (ie not on the pixmaps)?  I have pixmaps of slightly varying sizes,
DL> and they end up being all over the place as they appear to be aligned on
DL> their top edge. 

Don't know.

  -mb-

---

From: [email-masked] (Eric Ding)
Date: Wed, 27 Sep 95 16:47:54 PDT

>>>>> Dave Lane <[email-masked]> writes:

>   Current serial number in output stream:  158

This is most likely because you're swallowing windows into FvwmButtons,
which aren't getting "deleted" properly when fvwm is killed and restarted.
Chuck, this doesn't seem like "nice" behavior -- that is, if I "delete" the
FvwmButtons window, it doesn't happen; only when I restart/exit fvwm do I
get this error.  Ideas?

Eric

---

From: Po Shan Cheah <[email-masked]>
Date: Wed, 27 Sep 1995 22:21:06 -0400 (EDT)

> /bin/sh: -c: line 1: `"" (cd /usr/khoros/res/tg; xemacs & )

Try removing the quotes "". 

*FvwmButtons XEmacs emacs.xpm Exec (cd /usr/khoros/res/tg; xemacs &)

In fvwm 1.24r, the quotes indicate that the button should be popped back out
without waiting for a window with a specific class/name to appear but
this seems to have changed in pre 2.0.

> cannot execute: No such file or directory

In this case, try removing the quotes and the second exec.

AddToMenu "Editors" "Text..." Title
+              "Xemacs" Exec (cd /usr/khoros/res/tg; xemacs &)

According to the code, fvwm does an execvp of /bin/sh passing -c
as the first argument to sh and whatever follows Exec as the second argument
to sh and that explains this behavior.

Try typing /bin/sh -c 'exec "(cd /usr/khoros/res/tg; xemacs &)"' at your
shell prompt to reproduce the problem.