blob: 834dd72ba166fe4cf2bad6a19229de24b6f8f872 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
# Determine if X is running
if [ -z $DISPLAY ]; then
echo You must be running X for this.
else
# Try to determine the color depth of the X server
DEPTH=`xwininfo -root | grep Depth | awk '{print $2}'`
if [ $DEPTH = 24 -o $DEPTH = 32 ]; then
PROGRAM=tview-32
elif [ $DEPTH = 16 ]; then
PROGRAM=tview-16
elif [ $DEPTH = 8 ]; then
PROGRAM=tview-8
else
echo Can not determine color depth of Display $DISPLAY
fi
exec $PROGRAM $@
fi
|