blob: d93bab0cca67f22d9e360d33bbf972bcb983b3ff (
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
|
#!/bin/sh
if test -n "$1"; then
echo "Syntax: openbox-gnome-session"
echo
echo "See the openbox-gnome-session(1) manpage for help."
exit
fi
VER=$(gnome-session --version 2>/dev/null | \
sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/')
MAJOR=$(echo $VER | cut -d . -f 1)
MINOR=$(echo $VER | cut -d . -f 2)
# Run GNOME with Openbox as its window manager
export WINDOW_MANAGER="@bindir@/openbox"
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
# old gnome-session allows multiple sessions to be saved
exec gnome-session --choose-session=openbox-session "$@"
else
# make sure the gnome-wm script is being used
gconftool-2 -t string \
-s /desktop/gnome/session/required_components/windowmanager "gnome-wm" \
2> /dev/null
# new gnome-session does not allow multiple sessions
exec gnome-session "$@"
fi
|