aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
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-nodm
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-nodm')
-rwxr-xr-xmeta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index bfa0a8d6cb..6c548551b8 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -26,10 +26,11 @@ done
case "$1" in
start)
. /etc/profile
- username=root
+
+ #default for USER
+ . /etc/default/xserver-nodm
echo "Starting Xserver"
- if [ -f /etc/X11/Xusername ]; then
- username=`cat /etc/X11/Xusername`
+ if [ "$USER" != "root" ]; then
# setting for rootless X
chmod o+w /var/log
chmod g+r /dev/tty[0-3]
@@ -38,8 +39,9 @@ case "$1" in
chmod o+rw /dev/hidraw*
fi
fi
+
# Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
- su -l -c '/etc/X11/Xserver&' $username
+ su -l -c '/etc/xserver-nodm/Xserver &' $USER
# Wait for the desktop to say its finished loading
# before loading the rest of the system
# dbus-wait org.matchbox_project.desktop Loaded