[Dextrose] [PATCH][sugar] check for empty cursor_theme

Martin Abente martin.abente.lahaye at gmail.com
Mon Mar 14 12:20:04 EDT 2011

In dextrose2 caacupe tests we noticed that many laptops
had the standard x cursor instead of the sugar one.

Accessibility options include other gconf values at
the "/desktop/sugar/peripherals/mouse" path, and 
since the sugar script did not check for full path
content or existence, this script failed to set the 
mouse cursor. under these corner cases.

Version 2: Add bernie's optimization
 bin/sugar.in |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index bd6e95e..3615c70 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -78,11 +78,8 @@ fi
 # Set cursor theme
-gconftool-2 --dir-exists=/desktop/sugar/peripherals/mouse
-if [[ $EXIST_SUGAR_CURSOR_THEME == 0 ]]; then
-    CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme);
+CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme)
+if test -z "$CURSOR_THEME"; then

More information about the Dextrose mailing list