Subject: FVWM: Init and RestartFunction are *both* executed on init and restart

From: Alexander Kotelnikov <[email-masked]>
Date: Sat, 05 Jan 2002 09:36:14 +0300

Here is a simple .fvwm2rc that shows this:
#
DestroyFunc InitFunction
AddToFunc InitFunction
Module FvwmIconMan

DestroyFunc RestartFunction
AddToFunc RestartFunction
Module FvwmIconMan
#

Start fvwm with it and you'll get two FvwmIconMan modules, while
according to man fvwm only one should appear.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia
--
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: Dan Espen <[email-masked]>
Date: Sat, 05 Jan 2002 08:39:24 -0500

> according to man fvwm only one should appear.

Where did you see that?  It should have been:

DestroyFunc InitFunction
AddToFunc InitFunction
+ I Module FvwmIconMan

+ I Module FvwmIconMan

But, with recent releases, this would be better:

DestroyFunc 
AddToFunc StartFunction
+ I Module FvwmIconMan

-- 
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].

---

From: Tenebrae <[email-masked]>
Date: Sun, 6 Jan 2002 20:47:53 -0800 (PST)

> But, with recent releases, this would be better:

Now I'm confused...
I have a similar problem where the Eterm I launch at startup gets
launched again when I restart.  This is undesireable behaviour.
Is there a different place I'm supposed to put it, or how does that work?
I have this:

AddToFunc StartFunction     
+ I Exec Esetroot -f /usr/share/pixmaps/vpm_wp_01_1024.jpg &
+ I Exec Eterm -g 26x21+0+552 -F 5x7 -O -T XMessages -e tail -f
$HOME/.X.err 
+ I Module FvwmButtons
+ I Module FvwmTaskBar

I do not have an InitFunction or RestartFunction section. 
The modules don't seem to be double-started, but the eterm does.
I don't know about the background, since that's kinda hard to test...
*sigh*
								-Tenebrae.

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 7 Jan 2002 07:31:09 +0000

On 06 Jan 2002 20:47:53 -0800, Tenebrae wrote:
> + I Exec Eterm -g 26x21+0+552 -F 5x7 -O -T XMessages -e tail -f $HOME/.X.err 
> + I Module FvwmButtons
> + I Module FvwmTaskBar

Well, if you read the man page (you did, right?), you should find that
StartFunction is executed on both start-up and restart.

> I don't know about the background, since that's kinda hard to test...

The modules are part of FVWM and they are killed on quit or restart.
So, if you don't want Eterm to be launched twice, don't request this.

AddToFunc StartFunction
+ I Module FvwmButtons
+ I Module FvwmTaskBar

AddToFunc InitFunction
+ I Exec Esetroot -f /usr/share/pixmaps/vpm_wp_01_1024.jpg
+ I Exec Eterm -g 26x21+0+552 -F 5x7 -O -T XMessages -e tail -f $HOME/.X.err

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 7 Jan 2002 12:18:51 +0100

> StartFunction is executed on both start-up and restart.

Perhaps we'd better have named it "InitRestartFunction" to avoid
the confusion about the names.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Tenebrae <[email-masked]>
Date: Mon, 7 Jan 2002 06:33:33 -0800 (PST)

> StartFunction is executed on both start-up and restart.

Yeah, I did...

> The modules are part of FVWM and they are killed on quit or restart.

Oh.  That explains why the modules weren't started twice.  That confused
me, as did the StartFunction being executed both at start-up and
restart.  It kinda makes RestartFunction seem a bit redundant if that's
the case.  The man pages don't really give much in the way of examples and
typical usage, and the sample system.fvwm2rc doesn't even have a
StartFunction section at all.
I learn best by example.

> + I Exec Eterm -g 26x21+0+552 -F 5x7 -O -T XMessages -e tail -f $HOME/.X.err

This worked.
Thanks.
								-Tenebrae.

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 7 Jan 2002 16:12:40 +0000

On 07 Jan 2002 06:33:33 -0800, Tenebrae wrote:
> 
> The man pages don't really give much in the way of examples and

You look at your old system.fvwm2rc, it's not overwritten on installation.
All four sample.fvwmrc/system.fvwm2rc* files shipped with fvwm-2.4.* have
StartFunction, some have InitFunction as well.

Regards,
Mikhael.

---

From: Tenebrae <[email-masked]>
Date: Tue, 8 Jan 2002 06:28:07 -0800 (PST)

> StartFunction, some have InitFunction as well.

Oh...
I kinda wish it was, or that the new samples were put somewhere
convenient.  Maybe in /usr/libexec/fvwm/2.4.4/samples/ or on www.fvwm.org?
								-Tenebrae.