#!/bin/bash
#
# This is a script that will fire up fvwm2 using the AnotherLevel interface
# Intended to be used by other window managers that need to switch to
# AnotherLevel interface thorugh some sort of Restart mechanism
# 
# 	$Id: AnotherLevel,v 1.3 1998/05/07 19:51:50 gafton Exp $	

echo "Fvwm95" > $HOME/.wm_style

# Find the Anotherlevel config file
RCFILE=""
FVWMOPTIONS=""

[ -f /etc/X11/AnotherLevel/fvwm2rc.m4 ] && RCFILE=/etc/X11/AnotherLevel/fvwm2rc.m4
[ -f $HOME/.fvwm2rc.m4 ] && RCFILE=$HOME/.fvwm2rc.m4
# if it really exists, use it;
[ -n "$RCFILE" ] && FVWMOPTIONS="-cmd 'FvwmM4 -debug $RCFILE'"

env > "$HOME"/Xrootenv.0
# if this works, we stop here
eval exec fvwm2 ${FVWMOPTIONS} > $HOME/.FVWM2-errors 2>&1

