]> git.pld-linux.org Git - packages/fvwm2.git/blame - fvwm2.RunWM
- massive attack s/pld.org.pl/pld-linux.org/
[packages/fvwm2.git] / fvwm2.RunWM
CommitLineData
65da34cd
JR
1#!/bin/sh
2#
3# RunWM - this is a script used to launch window manager
4#
5
6# first, find an M4-enabled config file (such as
7# the one from AnotherLevel) for fvwm2 or fvwm95.
8RCFILE=""
9for tryfile in "$HOME/.fvwm2rc.m4" "/etc/X11/AnotherLevel/fvwm2rc.m4"; do
10 if [ -f "$tryfile" ]; then
11 RCFILE="$tryfile"
12 break
13 fi
14done
15
16# if it really exists, use it; if not, fvwm2 or fvwm95 will
17# automagically look for a config file in the regular places.
18if [ -n "$RCFILE" ]; then
19 FVWMOPTIONS="-cmd 'FvwmM4 -debug $RCFILE'"
20else
21 FVWMOPTIONS=""
22fi
23
24# TheNextLevel is supposed to work with both fvwm95 and fvwm2
25for FVWMVER in 2 95 95-2; do
26 if [ -n "$(which fvwm${FVWMVER})" ]; then
27 # if this works, we stop here
b8115d7b 28 eval "exec /usr/bin/fvwm${FVWMVER} ${FVWMOPTIONS}"
65da34cd
JR
29 fi
30done
31cat >&2 <<EOF
32 WARNING: You selected Fvwm2 as your window manager, but your installation
b8115d7b
JB
33 does not appear to be functional. The executable /usr/bin/fvwm2 was not
34 found on your system.
65da34cd 35EOF
This page took 0.033854 seconds and 4 git commands to generate.