summaryrefslogtreecommitdiff
path: root/src/run-metacity.sh
blob: a05c8e1062d8ada233412fb1d49f3ed14b0a8401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/bash

if test -z "$SCREENS"; then
  SCREENS=1
fi

if test "$DEBUG" = none; then
  DEBUG=
elif test -z "$DEBUG"; then
  DEBUG=
fi

if test -z "$CLIENTS"; then
  CLIENTS=0
fi

if test -z "$ONLY_WM"; then
  Xnest -ac :1 -scrns $SCREENS -geometry 640x400 -bw 15 &
  usleep 100000

  if test $CLIENTS != 0; then
    for I in `seq 1 $CLIENTS`; do
      DISPLAY=:1 xterm -geometry 25x15 &
    done
  fi
 
  usleep 50000

  DISPLAY=:1 xsetroot -solid royalblue3
fi

if test -z "$ONLY_SETUP"; then
  METACITY_UISLAVE_DIR=./uislave METACITY_DISPLAY=:1 exec unst libtool --mode=execute $DEBUG ./metacity $OPTIONS
fi