Subject: FVWM: Info on M_String

From: "Richard A. Guay" <[email-masked]>
Date: Wed, 7 May 1997 16:46:44 +0000

Hi,

I was wanting to make a module that would implement the M_String 
message to receive strings from a button click.  The only problem is 
I can not find any information on the packet format in any of the 
documents.  I am guessing that I will have to take apart the module.c 
code to figure it out.  From what I have seen, it will send the 
command to all modules of that name.  Since I plan to have multiple 
copies of the module loaded and I plan on using a mouse click on a 
title button for the modules window to issue the command, how do I 
know that the message is for the particular module that the title 
button was clicked?  (I hope I worded that correctly).

This is my first attempt at writing a module.  A user at my company 
wants to have an rxvt window with button on the title that send 
special commands to the shell that is in the window.  Therefore, I am 
attempting to modify the rxvt code to make it an fvwm module that 
will accept the M_String sent to it from a SendToModule command tied 
to a button on the title.  Is this feasible?  I have not looked at 
the rxvt code yet; I thought I would see if it was doable from fvwm 
side of things first.

Thanks for the help!

Richard A. Guay
Network Administrator and ASIC Design Engineer
ASIC International Inc.
[email-masked]
http://www.asicint.com
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: "Randy J. Ray" <[email-masked]>
Date: Wed, 7 May 1997 15:14:01 -0600

The M_STRING packet has 4 values in the body: 3 zeros, followed by the string
itself. It gets sent via:

SendToModule <pat> <str>

where <pat> is a pattern specifiying which module or modules receive <str>.
The problem here is that you are considering turning rxvt into a module, for
arguments' sake we'll call it FvwmRxvt, which will be sent some string via a
button on the title bar. So that button is bound to do:

SendToModule FvwmRxvt <str>

Let's say the user has 3 of these rxvt instances active when he clicks the
button on one of them... all 3 will get the packet.

Randy
--
===============================================================================
Randy J. Ray -- U S WEST Technologies IAD/CSS/DPDS         Phone: (303)595-2869
                Denver, CO                                     [email-masked]
"It's not denial. I'm just very selective about the reality I accept." --Calvin
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Michael Tiefenback <[email-masked]>
Date: Wed, 7 May 1997 17:28:58 -0400 (EDT)

Why would you want to make a terminal application into an fvwm module?  It
would appear to me (lowly nonprogrammer that I am) that you would prefer
to modify the underlying application to take special actions when the
button is clicked.  Like what xterm does with <Ctrl><Mouse-1/2/3>.
Couldn't you put the desired features of xterm back into rxvt more easily
than taking the decidedly specialized action of relying on fvwm?

Michael Tiefenback

---

From: Michael Tiefenback <[email-masked]>
Date: Wed, 7 May 1997 17:28:58 -0400 (EDT)

Michael Tiefenback

---

From: "Richard A. Guay" <[email-masked]>
Date: Thu, 8 May 1997 11:51:35 +0000

> button on one of them... all 3 will get the packet.

I realize that.  I was hopping that the information send with the 
packet contained the window ID of the window the button was clicked 
on.  If that information was also sent, it would make the 
SendToModule function much more powerfull for the case of multiple 
modules being used.

I will have to look into Chuck's suggestion of using xse.  I have not 
heard of that program before.  Thanks for the help and suggestions.

Richard A. Guay

---

From: "Richard A. Guay" <[email-masked]>
Date: Thu, 8 May 1997 11:51:36 +0000

> than taking the decidedly specialized action of relying on fvwm?

I never knew xterm did special things with the <ctrl><Mouse-1/2/3>!  
But, this does not give the functionality that they user wants.  He 
wants buttons in the title bar area (that is controled by fvwm) to 
execute scripts inside the rxvt window.  To extend the rxvt program 
to do these features would make the window larger since I would have 
to basically put a menu bar area that would have buttons on it.  
Also, to have the configurability that the user wanted would take 
quit a bit of added programming.  Therefore, it seemed to me to be 
easier to make it into an fvwm module that gets the M_String message 
from fvwm and sends it to the shell that is in use.  Since fvwm 
already handles configureable buttons and popup menus, I would not 
have to do as much programming (Okay, I'm lazy!).

Also, I do not know X programming yet.  Therefore, I could make these 
changes without having to learn a new programming environment (I 
believe.  I have not dived into the rxvt code yet!).

Richard A. Guay

---

From: Guido Notari <[email-masked]>
Date: Thu, 8 May 1997 18:29:24 +0200

> to basically put a menu bar area that would have buttons on it.  

I seem to recall that the latest rxvt release, 2.21 I think, implements an
experimental configurable menu-bar in the first line of the display(?)

Though not the buttons in the title bar you want -- rather unstandard, I
may add -- it may do what your client wants.

				Guido

-- 
Guido Notari (EC Joint Research Centre, Ispra site)
postal:  TP 210,  JRC,  21020 Ispra (VA),  Italia
tel: +39 332 785528    fax: +39 332 785813
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: "Randy J. Ray" <[email-masked]>
Date: Thu, 8 May 1997 11:18:27 -0600

> SendToModule function much more powerfull for the case of multiple 

The window ID is only sent to a module when the module is executed. It is sent
as one of the command-line arguments. The value is zero if the module was not
started in the context of an existant window (from a titlebar button or some
such), that is, if it was launched from the dot-file or from a root-window
menu.

The only packets that contain window identification are those which contain
data specific to a window-- iconification, configuration, resource names, etc.
M_STRING is a broadcast packet, and thus is not tied to a specific window.

Randy

---

From: Richard Lister <[email-masked]>
Date: Thu, 08 May 1997 13:52:09 -0400

On Thu, 8 May 1997 18:29:24 +0200
Guido Notari <[email-masked]> 
> experimental configurable menu-bar in the first line of the display(?)

Anyone know a canonical site for rxvt? I can only find 2.20 at ftp archives
and no information on development.

Cheers
Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC.
Phone: 202-687 2878
Email: [email-masked] 
Web: http://www.giccs.georgetown.edu/
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Dan Espen <[email-masked]>
Date: Thu, 08 May 1997 15:58:57 -0400

> and no information on development.

I recently grabbed the Rasterman's rxvt from:

http://www.cse.unsw.edu.au/~s2154962/linux_rxvt.html

This  version supports pixmaps in the  background.  Possibly you could
use the pixmap background as a way  of providing the menu-bar you want
to click on.  A minor  hack to the source  code could detect where you
clicked and run the command you want.

--
Dan Espen                                    Phone: (908) 699-5570
[email-masked]
444 Hoes Lane  Room RRC 1C-214
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Chris Laas <[email-masked]>
Date: Thu, 8 May 1997 21:14:05 -0400 (EDT)

> M_STRING is a broadcast packet, and thus is not tied to a specific window.

True, but you might be able to use a hack like this (I haven't tried it
out, but it oughta work).  Create a function:

AddToFunction MySendToModule "I" SendToModule $0 $w $1

(or something like that) and call MySendToModule instead.  Then have
the pseudo-rxvt parse the window-id out of the string, and ignore the
message if it's not that instance's id.

This is just an idea - I certainly haven't tested it.  Is $w even still
implemented in 2.0.45?

--Chris

-- 
Prudence, indeed, will dictate that governments long established
should not be changed for light and transient causes; and accordingly
all experience hath shown that mankind are more disposed to suffer,
while evils are sufferable, than to right themselves by abolishing the
forms to which they are accustomed.
    -- Thomas Jefferson, Prologue, "Declaration of Independence"
______________________________________________________________________
Chris Laas:  Unix, C++, Perl, Tcl/Tk / mailto:[email-masked]
Limit[tech->Inf](words/acronyms)==0 / http://www.cybercom.net/~chrisl/

---

From: Guido Notari <[email-masked]>
Date: Fri, 9 May 1997 10:18:15 +0200

> and no information on development.

The only site that actually carries it seems to be its home site:

ftp://ftp.fu-berlin.de/pub/unix/X11/terms/rxvt/

I don't really know why all others still carry v.2.20, which is buggy and
incomplete.

				Guido

---

From: Bruce Stephens <[email-masked]>
Date: Fri, 09 May 1997 14:49:03 +0100

> I don't really know why all others still carry v.2.20, which is buggy 
> and incomplete. 

Presumably because the current maintainer hasn't told anybody about the new 
version.  (In particular, he/she hasn't submitted it to the obvious places 
like ftp.x.org, sunsite.unc.edu, etc.)

If I'd wanted to find the home site for rxvt, how would I have known that it's 
ftp.fu-berlin.de?  There's no mention of that site in the sources to 
rxvt-2.20. Indeed, a quick scan through Deja News suggests that there's a 
"math" missing: it should be ftp.math.fu-berlin.de, with the home page 
allegedly <URL:http://www.math.fu.berlin.de/~kesim/rxvt>, although I can't 
contact either site (I think that's our problem---we have some connectivity 
problems with Germany at present).
-- 
Bruce Stephens	[email-masked]
Isode Ltd.	<URL:http://www.isode.com/>

---

From: Guido Notari <[email-masked]>
Date: Fri, 9 May 1997 16:29:36 +0200

> allegedly <URL:http://www.math.fu.berlin.de/~kesim/rxvt>, although I can't 

The URL I stated is correct, I checked it out before posting and rxvt 2.21
is there.

I now remember having notice of the new release directly from the author.
I wrote him about some problems in v.2.20.  I then found version 2.21
with an ftp search engine "http://ftpsearch.unit.no/ftpsearch/"

The real problem most probably is that rxvt doesn't have a *stable*
mantainer from a long time.

Anyway, this is the lsm file from v.2.21

----------------------------------------------------------------------

Begin3
Title:		rxvt
Version:	2.21
Entered-date:	03FEB97

Description:	Rxvt is an 8-bit clean, colour xterm replacement that uses
		significantly less memory than a conventional xterm, mostly
		since it doesn't support toolkit configurability or Tek
		graphics, but also since features can be removed at
		compile-time to reflect your needs.  Some rxvt features
		(compilation dependent): ANSI-color, bold/blink attributes
		modify foreground/background colours, scrollbars with arrow
		buttons, kanji and greek support, printer-pipe, XPM
		backgounds with on-the-fly scaling, user-definable menus.

		The distribution also includes rclock, the smaller/better
		xclock replacement with appointment scheduling and xbiff
		functionality.

Keywords:	rxvt colour color kanji xterm X11 vt100 terminal-emulator
		rclock xbiff xpm menu

Author:		* John Bovey [Univ. Kent at Canterbury] was the creator of
		  the original xvt.

		* Rob Nation [Lockheed] re-wrote most of xvt to make a
		  substantiallly enhanced version called rxvt (Rob's xvt)
		  and also wrote rclock (Rob's clock).

		* Mark Olesen [Queen's Univ. at Kingston] made various
		  improvements and cleanups.

Maintained-by:	Oezguer Kesim <[email-masked]> Project Coordinator

Primary-site:	tsx-11.mit.edu /pub/linux/sources/usr.bin.X11
		208k	rxvt-2.21.tar.gz

Alternate-site:	ftp.nuclecu.unam.mx /linux/local/rxvt
		208k	rxvt-2.21.tar.gz

Original-site:  ftp.fu-berlin.de /pub/unix/X11/terms/rxvt
		208k	rxvt-2.21.tar.gz

Platforms:	requires X11 installed

Copying-policy:	Do what you want,
		but can't make money on it.

End
_________________________________________________________________

Note that there is actually no trace of rxvt in tsx11 or Sunsite, for that
matter.

				Guido

---

From: Richard Lister <[email-masked]>
Date: Fri, 09 May 1997 10:36:39 -0400

On Fri, 09 May 1997 14:49:03 +0100
Bruce Stephens <[email-masked]> 
wrote concerning 'Re: FVWM: rxvt 2.21':
> bvious places 
> allegedly <URL:http://www.math.fu.berlin.de/~kesim/rxvt>

That url is not quite right. It should be
  http://www.math.fu-berlin.de/~kesim/rxvt/
which is the rxvt homepage. Exactly what I was looking for.

I'd already tried Rasterman's rxvt-xpm, which is funky but a bit
slow. I wanted to try the official rxvt with the new menubar code.

Thanks to everyone for the pointers.

Ric