Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: src/scripts/mod_for_factory_scripts/factory_startx.sh

Issue 1937002: Launch X server from upstart. New factory UI. Misc script tweaks. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: response to feedback Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/scripts/mod_for_factory_scripts/factory_startx.sh
diff --git a/src/scripts/mod_for_factory_scripts/factory_startx.sh b/src/scripts/mod_for_factory_scripts/factory_startx.sh
new file mode 100644
index 0000000000000000000000000000000000000000..5a38fa32526794375875e3ea4f96ee20191760c9
--- /dev/null
+++ b/src/scripts/mod_for_factory_scripts/factory_startx.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+XAUTH=/usr/bin/xauth
+XAUTH_FILE="/var/run/factory_ui.auth"
+SERVER_READY=
+DISPLAY=":0"
+
+user1_handler () {
+ echo "X server ready..." 1>&2
+ SERVER_READY=y
+}
+
+trap user1_handler USR1
+MCOOKIE=$(head -c 8 /dev/urandom | openssl md5)
+${XAUTH} -q -f ${XAUTH_FILE} add ${DISPLAY} . ${MCOOKIE}
+
+/sbin/xstart.sh ${XAUTH_FILE} &
+
+while [ -z ${SERVER_READY} ]; do
+ sleep .1
+done
+
+/sbin/initctl emit factory-ui-started
+cat /proc/uptime > /tmp/uptime-x-started
+
+echo "DISPLAY=${DISPLAY}; export DISPLAY"
+echo "XAUTHORITY=${XAUTH_FILE}; export XAUTHORITY"
« no previous file with comments | « src/scripts/mod_for_factory_scripts/400configAutotest ('k') | src/scripts/mod_for_factory_scripts/factory_ui » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698