summaryrefslogtreecommitdiff
path: root/src/run-metacity.sh
blob: 30d728084e50f300c95dabf4eb03b390b112a755 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /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 "$SM_CLIENTS"; then
  SM_CLIENTS=0
fi

if test -n "$EVIL_TEST"; then
  TEST_CLIENT='./wm-tester/wm-tester --evil'
fi

if test -n "$ICON_TEST"; then
  TEST_CLIENT='./wm-tester/wm-tester --icon-windows'
fi

if test -z "$ONLY_WM"; then
  Xnest -ac :1 -scrns $SCREENS -geometry 640x480 -bw 15 &
  ## usleep 800000
  sleep 1

  if test -n "$TEST_CLIENT"; then
    DISPLAY=:1 $TEST_CLIENT &
  fi

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

  if test $SM_CLIENTS != 0; then
    for I in `seq 1 $SM_CLIENTS`; do
      echo "Launching gnome-terminal $I"
      DISPLAY=:1 gnome-terminal --geometry 25x15 &
    done
  fi
 
  usleep 50000

  DISPLAY=:1 xsetroot -solid royalblue3
fi

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