diff options
author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2016-09-01 09:53:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-09 11:53:36 +0100 |
commit | 3b7cdffebd12da9646f43573d989c9a76476241f (patch) | |
tree | ccb241a7b2c7974b8c42dcb31dc9b8a3009f978a /meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | |
parent | 37f4b39d0e9809f06ac8f010a347b323857a5a0f (diff) | |
download | poky-3b7cdffebd12da9646f43573d989c9a76476241f.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.
(From OE-Core rev: e8ce3d2626e505924a75de96650abca166fd230a)
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-x | meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 10 |
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 | |||
26 | case "$1" in | 26 | case "$1" in |
27 | start) | 27 | start) |
28 | . /etc/profile | 28 | . /etc/profile |
29 | username=root | 29 | |
30 | #default for USER | ||
31 | . /etc/default/xserver-nodm | ||
30 | echo "Starting Xserver" | 32 | echo "Starting Xserver" |
31 | if [ -f /etc/X11/Xusername ]; then | 33 | if [ "$USER" != "root" ]; then |
32 | username=`cat /etc/X11/Xusername` | ||
33 | # setting for rootless X | 34 | # setting for rootless X |
34 | chmod o+w /var/log | 35 | chmod o+w /var/log |
35 | chmod g+r /dev/tty[0-3] | 36 | chmod g+r /dev/tty[0-3] |
@@ -38,8 +39,9 @@ case "$1" in | |||
38 | chmod o+rw /dev/hidraw* | 39 | chmod o+rw /dev/hidraw* |
39 | fi | 40 | fi |
40 | fi | 41 | fi |
42 | |||
41 | # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] | 43 | # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] |
42 | su -l -c '/etc/X11/Xserver&' $username | 44 | su -l -c '/etc/xserver-nodm/Xserver &' $USER |
43 | # Wait for the desktop to say its finished loading | 45 | # Wait for the desktop to say its finished loading |
44 | # before loading the rest of the system | 46 | # before loading the rest of the system |
45 | # dbus-wait org.matchbox_project.desktop Loaded | 47 | # dbus-wait org.matchbox_project.desktop Loaded |