Subject: FVWM: Determine is WM is running?

From: Scott Barber <[email-masked]>
Date: Fri, 5 Feb 1999 14:34:20 -0500 (EST)

Hello all,
	I've searched the archives and haven't found and answer to my question, so I thought I give this a shot.

I have an application currently written to user motif as a window manager and if the window manager dies
motif automatically restarts.  The test for motif running is XmIsMotifWMRunning().  I'm sure it is 
possible to test for other window managers running, but I'm not sure how.  Does anyone have any ideas 
about how to go about this?

Thanks,

Scott Barber
INRI-Charleston
843-745-9922 Voice
843-745-9609 Fax

--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
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: Fri, 05 Feb 1999 15:17:30 -0500

Scott Barber <[email-masked]> writes:
> I have  an application currently written  to user motif  as a window
> manager and if the window manager dies motif automatically restarts.
> The test for motif running is XmIsMotifWMRunning().   I'm sure it is
> possible to test for other window managers running, but I'm not sure
> how.  Do es anyone have any ideas about how to go about this?

There are lots of ways.  My favorite:

In my .xinitrc:

loopwm fvwm2 &

And the "loopwm" shell:

#first run the wm, then prompt for which one to run next":
wm=$@
while [ 0 ] ; do
  $wm
  wm=`xprompt -geometry +100+100 -re -warp -rlen 44 \
-p 'WM/end (fvwm2, twm, mwm, olwm)'`
  if [ "$wm" = "end" ] ; then
    exit
  fi
done

This allows me  to quit out of  the WM and pick   another one to  run.
(There are a few versions of xprompt  I've run into, the exact command
needed may vary.)

--
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://fvwm.math.uh.edu/>.
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].