Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/sugar.in
blob: 47cca31c888b05ecb03c1e1c763595583bcc57af (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
#!/bin/sh

init_cursor() {
    # have to reset cursor(metacity sets it on startup)
    # ugly but works
    for i in 1 2 3; do
        sleep 1
        xsetroot -cursor_name left_ptr
    done
}

if test -z "$SUGAR_SCALING"; then
    export SUGAR_SCALING=72
fi

export GTK2_RC_FILES="@prefix@/share/sugar/data/sugar-$SUGAR_SCALING.gtkrc"

# Needed for executing wpa_passphrase
export PATH="$PATH":/sbin:/usr/sbin

if ! test -f "$GTK2_RC_FILES"; then
    echo "sugar: ERROR: Gtk theme for scaling $SUGAR_SCALING not available in path $GTK2_RC_FILES"
    exit 1
fi

# Source debug definitions
if [ -f ~/.sugar/debug ]; then
        . ~/.sugar/debug
fi

echo Xcursor.theme: sugar | xrdb -merge
metacity --no-force-fullscreen &
init_cursor &

exec sugar-session