Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts/xinitrc
blob: 466d4f0f4acf93385d5182656be7a47ede5ecfed (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
unset GPG_AGENT_INFO
unset SSH_AUTH_SOCK
unset GNOME_KEYRING_CONTROL
unset GNOME_KEYRING_PID

SCRIPTS_DIR=`dirname "$0"`
ROOT_DIR=`dirname "$SCRIPTS_DIR"`

# Sugar doesn't handle multiple outputs properly. To avoid issues we keep the
# first output in the list returned by xrandr and turn off everything else.

OUTPUTS=`scripts/list-outputs`

for output in $OUTPUTS
do
   # Default to the first output in the list
   if [ -z $SUGAR_OUTPUT ]; then
       SUGAR_OUTPUT=$output
   fi

   if [ $SUGAR_OUTPUT != $output ]; then
       xrandr --output $output --off
   fi
done

JHBUILD="$ROOT_DIR/install/bin/jhbuild -f $ROOT_DIR/scripts/jhbuildrc"
RUN_COMMAND="dbus-launch --exit-with-session sugar"

if [ -z $SUGAR_BUILD_SHELL ]; then
    $JHBUILD run $RUN_COMMAND
else
    $RUN_COMMAND
fi