Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-02 13:14:39 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-02 13:14:39 (GMT)
commit14dd545314bbeaced5d11364dd4fa79f8cc34e2c (patch)
treec4476fe1187541562edf17265858f897530c36c0 /scripts
parent41c6bc801aed3f7e2c238f72ea39c30dc4cbf652 (diff)
Work around Xephyr not setting up keyboard properly
Copy the configuration from the parent X session.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/shell/start-sugar8
-rw-r--r--scripts/xinitrc5
2 files changed, 12 insertions, 1 deletions
diff --git a/scripts/shell/start-sugar b/scripts/shell/start-sugar
index 5408a43..3ac2f09 100755
--- a/scripts/shell/start-sugar
+++ b/scripts/shell/start-sugar
@@ -6,7 +6,13 @@ rootdir=`dirname "$scriptsdir"`
display=`$scriptsdir/find-free-display`
if [ -f $rootdir/config ]; then
- source $rootdir/config
+ source $rootdir/config
+fi
+
+if [ -n $SUGAR_DISPLAY ]; then
+ SUGAR_XKBCONFIG=`mktemp -t sugar-xkbconfig-XXXXXX`
+ setxkbmap -print > $SUGAR_XKBCONFIG
+ export SUGAR_XKBCONFIG
fi
if [ ! -z $SUGAR_PROFILE ]; then
diff --git a/scripts/xinitrc b/scripts/xinitrc
index cdf3268..9dfc388 100644
--- a/scripts/xinitrc
+++ b/scripts/xinitrc
@@ -47,6 +47,11 @@ elif [ ! -z $PROFILE ]; then
export SUGAR_PROFILE=$PROFILE
fi
+if [ -n $SUGAR_XKBCONFIG ]; then
+ cat $SUGAR_XKBCONFIG | xkbcomp - $DISPLAY 2> /dev/null
+ rm $SUGAR_XKBCONFIG
+fi
+
JHBUILD="$ROOT_DIR/install/bin/jhbuild -f $ROOT_DIR/scripts/jhbuildrc"
RUN_COMMAND="dbus-launch --exit-with-session $SCRIPTS_DIR/run-with-keyring sugar"