Subject: FVWM: ExitFunction?

From: Andrew Sullivan <[email-masked]>
Date: Wed, 21 Feb 2001 09:59:19 -0500

Hi,

I'm trying to get something to work with ExitFunction, and it's not
happening.  I wonder whether I mightn't be doing something wrong. 
I've looked for example .fvwm2rc files that use this function, and
haven't had any luck.

I have a shell script that a user wants to move her .forward file out
of the way when she logs in, and move it back when she leaves. 
Simple enough; but she always logs in through X, and (of course) I
don't want the script to run every time she closes a shell. 

I figured the answer was ExitFunction, since the man page says 

	Fvwm  also has a special exit function: ExitFunction, exe
       cuted when exiting or restarting before actually  quitting
       or  anything  else.

But when I run the script, it has no effect.  (The script works
otherwise.)  Initially I thought there might be an issue with
ExitFunction passing arguments, but that doesn't seem to be the case,
because there are no errors of any kind generated.  Here's the call:
 
AddToFunc ExitFunction "I" Exec /home/ajs/moveforward mvback-ni

Any suggestions welcome.

A

-- 
Andrew Sullivan                       |     McMaster University
Research Computing Support, CIS       |   1280 Main Street West
[email-masked]            |       Hamilton, Ontario
+1 905 525 9140 x 27601               |                 L8S 4L8
--
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-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (larry gensch)
Date: Wed, 21 Feb 2001 10:11:50 -0500 (EST)

> AddToFunc ExitFunction "I" Exec /home/ajs/moveforward mvback-ni

Is her fvwm2 environment "session managed" (eg, is she running under a
session manager like KDE or GNOME)?  If so, use the name
"SessionExitFunction" instead of "ExitFunction" or even better:

AddToFunc ExitFunction "I" Exec /home/ajs/moveforward mvback-ni
AddToFunc SessionExitFunction "I" ExitFunction

This will ensure that the ExitFunction is called in a regular or
session-managed environment.

-- 
Larry Gensch                                          [email-masked]

               Working for COMPAQ for a twentieth of a century

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 21 Feb 2001 10:20:30 -0500 (EST)

Hi,

I'm not really sure of the answer, but think it might have to do with the
process getting killed before it can be completed...

Try adding a PipeRead command before the Exec.  This will cause the
function to wait for the shell script to exit. 

Hope it works...

Tom

-- 
_________________________________________________________________________
Thomas Gardiner
[email-masked]

University of Rochester
Department of Physics and Astronomy
P. O. Box 270171
Rochester, NY 14627-0171

(716) 275-8557 Office
(716) 275-8527 fax
__________________________________________________________________________

The scientist does not study nature because it is useful; he studies it
because he delights in it, and he delights in it because it is beautiful.
If nature were not beautiful, it would not be worth knowing, and if nature
were not worth knowing, life would not be worth living.- Henri Poincare
__________________________________________________________________________

---

From: Dan Espen <[email-masked]>
Date: Wed, 21 Feb 2001 10:39:31 -0500

> function to wait for the shell script to exit. 

Since lots of  things fvwm Execs survive restarts  and  exits, I don't
think thats whats happening, but it can't hurt to try.

If I was doing this, I'd use the .xinitrc and set a "trap" to move
the file back.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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-masked].
To report problems, send mail to [email-masked].