Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-06-22 09:07:39 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-06-22 09:08:06 (GMT)
commitb9c5620f1dc1fec2ea97636f44a0b4e06b94946c (patch)
tree1bfbc8e3a6488095c4d5527a9bed98e9e29f0c38
parent956fb2113a8920ad2df2ca3afd2ed9e22dda10f4 (diff)
Add a SUGAR_OUTPUT variable
-rw-r--r--README9
-rw-r--r--TODO1
-rw-r--r--scripts/xinitrc9
3 files changed, 15 insertions, 4 deletions
diff --git a/README b/README
index fd89cb7..df747ef 100644
--- a/README
+++ b/README
@@ -31,6 +31,15 @@ make build-[module] Build a single module.
make clean Delete build artifacts and sources.
make bug-report Generate a bug report.
+= Environment variables =
+
+SUGAR_OUTPUT
+
+Sugar does not run properly on multiple video outputs, so we need to select one
+and turn off the others. By default we select the first output listed by RandR.
+You can set this variable to override that with any other of the connected
+outputs reported by xrandr command, for example VGA1 if you have an external monitor.
+
= Report bugs =
To generate bug report information
diff --git a/TODO b/TODO
index 6393de3..75b7a4c 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,2 @@
* Ensure we have pkg-config, probably refactor as prerequisites
-* Add SUGAR_OUTPUT
* Build web activity
diff --git a/scripts/xinitrc b/scripts/xinitrc
index 90927bf..20a2276 100644
--- a/scripts/xinitrc
+++ b/scripts/xinitrc
@@ -13,9 +13,12 @@ OUTPUTS=`scripts/list-outputs`
for output in $OUTPUTS
do
- if [ -z "$FIRST_OUTPUT" ]; then
- FIRST_OUTPUT=$output
- else
+ # 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