]>
Commit | Line | Data |
---|---|---|
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. | |
8 | RCFILE="" | |
9 | for tryfile in "$HOME/.fvwm2rc.m4" "/etc/X11/AnotherLevel/fvwm2rc.m4"; do | |
10 | if [ -f "$tryfile" ]; then | |
11 | RCFILE="$tryfile" | |
12 | break | |
13 | fi | |
14 | done | |
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. | |
18 | if [ -n "$RCFILE" ]; then | |
19 | FVWMOPTIONS="-cmd 'FvwmM4 -debug $RCFILE'" | |
20 | else | |
21 | FVWMOPTIONS="" | |
22 | fi | |
23 | ||
24 | # TheNextLevel is supposed to work with both fvwm95 and fvwm2 | |
25 | for 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 |
30 | done | |
31 | cat >&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 | 35 | EOF |