]> git.pld-linux.org Git - packages/fvwm2.git/blob - fvwm2.RunWM
- massive attack s/pld.org.pl/pld-linux.org/
[packages/fvwm2.git] / fvwm2.RunWM
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
28                 eval "exec /usr/bin/fvwm${FVWMVER} ${FVWMOPTIONS}"
29         fi
30 done
31 cat >&2 <<EOF
32  WARNING: You selected Fvwm2 as your window manager, but your installation
33  does not appear to be functional. The executable /usr/bin/fvwm2 was not
34  found on your system.
35 EOF
This page took 0.029517 seconds and 3 git commands to generate.