aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-09-01 09:53:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-01 22:24:26 +0100
commit78f8b0199fd9b30305952f438d57e5787e06ccb0 (patch)
treef8ef66329f462f88dbc4775bc19315e289d3e55e /meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
parent8cf9801a1b5d75a57eb9f26c1144dfe357a92c1e (diff)
downloadopenembedded-core-contrib-78f8b0199fd9b30305952f438d57e5787e06ccb0.tar.gz
xserver-nodm-init: Deprecate /etc/X11/Xserver
This commit should provide the same functionality as before, but should make meta-oe xserver-nodm-init-2.0 obsolete as well as keep systemd and sysvinit startup better in sync. /etc/X11/Xserver is not called anymore: it is provided by both x11-common and xserver-common with no useful differences (but some annoying ones). Instead xserver-nodm-init provides /etc/xserver-nodm/Xserver as the startup script and /etc/default/xserver-nodm as the default settings file. These are used by both init systems. The Xserver script could be completely removed (with sysv and systemd calling xinit directly), but to keep compatibility with meta-oes xserver-nodm-init-2.0 the Xserver script sources /etc/X11/xserver-common if one exists -- and systemd EnvironmentFile cannot do that. x11-common used to have a packageconfig to easily control screen blanking. Move this to xserver-nodm-init. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver')
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
new file mode 100644
index 0000000000..0edbfbfc20
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# This script is only needed to make sure /etc/X11/xserver-common
+# can affect XSERVER, ARGS & DPI: otherwise systemd could just use
+# /etc/default/xserver-nodm as EnvironmentFile and sysvinit could just
+# source the same file
+
+. /etc/profile
+
+# load default values for XSERVER, ARGS, DISPLAY...
+. /etc/default/xserver-nodm
+
+# Allow xserver-common to override ARGS, XSERVER, DPI
+if [ -e /etc/X11/xserver-common ] ; then
+ . /etc/X11/xserver-common
+ if [ ! -e $XSERVER ] ; then
+ XSERVER=$(which $XSERVER)
+ fi
+fi
+
+if [ -n "$DPI" ] ; then
+ ARGS="$ARGS -dpi $DPI"
+fi
+
+exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*