From f4324ad8bff1e1fb6594d599c5aa8b2149621cd2 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Tue, 07 Aug 2012 11:40:38 +0000 Subject: Merge branch 'master' of git.sugarlabs.org:sugar-build/sugar-build --- diff --git a/Makefile b/Makefile index 946f362..25e0417 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ LOGFILE = $(CURDIR)/logs/build-$(TIMESTAMP).log SCRIPTS = $(CURDIR)/scripts JHBUILD = $(CURDIR)/install/bin/jhbuild -f $(SCRIPTS)/jhbuildrc LOG = $(SCRIPTS)/log-command -XINITDISPLAY = `$(SCRIPTS)/find-free-display` # The buildbot shell does not handle script properly. It's unnecessary # anyway because we can't use interactive scripts there. @@ -50,7 +49,7 @@ build-%: $(TYPESCRIPT) "$(JHBUILD) buildone $*" $(LOGFILE) run: x11-utils - xinit $(SCRIPTS)/xinitrc -- $(XINITDISPLAY) &>>$(LOGFILE) + $(SCRIPTS)/shell/start-sugar test: x11-utils $(LOG) "$(SCRIPTS)/run-dogtail-tests" $(LOGFILE) diff --git a/README b/README index 7cd23f9..01ed54a 100644 --- a/README +++ b/README @@ -99,3 +99,8 @@ Sugar supports multiple profiles, so that you can run multiple instances with the same user. You can specify the name of the profile with this option. A random generated one is added to the config if you are running sugar-build under sugar. + +RUN_IN_WINDOW + +Set this variable to any value to run Sugar inside a window rather +than fullscreen. diff --git a/scripts/check-system b/scripts/check-system index 6dcad8e..e7df307 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -293,6 +293,10 @@ checks = \ "checker": "gtkmodule", "packages": { "fedora": "at-spi2-atk", "ubuntu": "libatk-adaptor" } }, + { "check": "Xephyr", + "checker": "binary", + "packages": { "fedora": "xorg-x11-server-Xephyr", + "ubuntu": "xserver-xephyr" } }, { "check": "dbus-launch", "checker": "binary", "packages": { "fedora": "dbus-x11", diff --git a/scripts/shell/start-sugar b/scripts/shell/start-sugar index 0bb1b5c..5408a43 100755 --- a/scripts/shell/start-sugar +++ b/scripts/shell/start-sugar @@ -1,7 +1,24 @@ -#!/bin/sh +#!/bin/bash shelldir=`dirname "$0"` scriptsdir=`dirname "$shelldir"` +rootdir=`dirname "$scriptsdir"` display=`$scriptsdir/find-free-display` -xinit $scriptsdir/xinitrc -- $display +if [ -f $rootdir/config ]; then + source $rootdir/config +fi + +if [ ! -z $SUGAR_PROFILE ]; then + grep -q PROFILE $rootdir/config + if [ $? -eq 1 ]; then + randomstring=`> $ROOT_DIR/config + fi +fi + +if [ -z $RUN_IN_WINDOW ]; then + xinit $scriptsdir/xinitrc -- $display +else + xinit $scriptsdir/xinitrc -- /usr/bin/Xephyr $display +fi diff --git a/scripts/xinitrc b/scripts/xinitrc index 6c733d5..fc0b266 100644 --- a/scripts/xinitrc +++ b/scripts/xinitrc @@ -7,10 +7,6 @@ unset SESSION_MANAGER SCRIPTS_DIR=`dirname "$0"` ROOT_DIR=`dirname "$SCRIPTS_DIR"` -if [ ! -f $ROOT_DIR/config ]; then - touch $ROOT_DIR/config -fi - if [ ! -z $SUGAR_PROFILE ]; then grep -q PROFILE $ROOT_DIR/config if [ $? -eq 1 ]; then @@ -19,7 +15,9 @@ if [ ! -z $SUGAR_PROFILE ]; then fi fi -source $ROOT_DIR/config +if [ -f $ROOT_DIR/config ]; then + source $ROOT_DIR/config +fi # 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. @@ -38,7 +36,10 @@ do fi done -echo $SUGAR_DOGTAIL +if [ ! -z $RESOLUTION ]; then + xrandr -s $RESOLUTION +fi + if [ ! -z $SUGAR_DOGTAIL ]; then rm -rf ~/.sugar/dogtail export SUGAR_PROFILE=dogtail diff --git a/tests/shell.py b/tests/shell.py index ff5a13e..dc045d4 100644 --- a/tests/shell.py +++ b/tests/shell.py @@ -61,6 +61,8 @@ def go_to_list_view(): done_button = shell.child(name="Done", roleName="push button") done_button.click() + sleep(10) + radio_button = shell.child(name="List view", roleName="radio button") radio_button.click() -- cgit v0.9.1