Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xinitrc14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/xinitrc b/scripts/xinitrc
index fd85440..ea1ae23 100644
--- a/scripts/xinitrc
+++ b/scripts/xinitrc
@@ -7,10 +7,20 @@ unset SESSION_MANAGER
SCRIPTS_DIR=`dirname "$0"`
ROOT_DIR=`dirname "$SCRIPTS_DIR"`
-if [ -f $ROOT_DIR/config ]; then
- source $ROOT_DIR/config
+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
+ randomstring=`</dev/urandom tr -cd A-Za-z0-9 | head -c10`
+ echo "PROFILE=$randomstring" >> $ROOT_DIR/config
+ fi
+fi
+
+source $ROOT_DIR/config
+
# 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.