Subject: FVWM: Quit fvwm when last window is closed

From: Rick Teudt <[email-masked]>
Date: Mon, 1 May 2000 18:13:06 -0700

Hi all,

I am new to the world of fvwm, so I hope there is an easy solution for this
problem that I just haven't figured out yet:  I would like to start an
application in InitFunction, and have fvwm automatically quit when that
application is exited or killed.

Any suggestions would be greatly appreciated!

Thanks,

Rick Teudt

--
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: Mike Bloy <[email-masked]>
Date: Tue, 02 May 2000 08:05:55 -0500

On Mon, 1 May 2000 18:13:06 -0700 , Rick Teudt <[email-masked]> said:

> I am new to the world of fvwm, so I hope there is an easy solution
> for this problem that I just haven't figured out yet: I would like
> to start an application in InitFunction, and have fvwm automatically
> quit when that application is exited or killed.

What you probably want to do is go outside of FVWM for this. If you
start up FVWM in your .xsession (or whatever) with 

fvwm2 &

processing continues in the .xsession. Then you start up your window
with a line like this

exec logout_app -option -option 

That makes logout_app the controlling process for the X session, which 
sounds like what you want.

-- 
Mike Bloy <[email-masked]>     <URL:http://www.cs.wisc.edu/~bloy/>
"We need to fold the monkey." -- http://www.monkeybagel.com 
--
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: Dominik Vogt <[email-masked]>
Date: Wed, 3 May 2000 05:03:21 +0200

> Any suggestions would be greatly appreciated!

You can do it with FvwmEvent:

  *FvwmEvent destroy_window NoWindowsQuit
  AddToFunc InitFunction
  + i FvwmEvent
  AddToFunc RestartFunction
  + i FvwmEvent
  AddToFunc NoWindowsQuit
  + i none quit

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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: Neil Zanella <[email-masked]>
Date: Thu, 4 May 2000 21:11:40 -0230 (NDT)

I suggest having your InitFunction use an Exec followed by a one line
shell script which does the following:

- starts your application
- moitors whether the application is running the Unix ps and grep and/or
  awk commands and the sleep command embedded in an infinite for loop
  (man ps; man grep; man awk; man sleep; info bash)
- then use PipeRead to extract the Fvwm Quit command which will be output
  by your script's last line echo Quit.

That should do it. What application is it you're trying to monitor and
why?

Regards,

Neil