summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/x11-common/xserver-nodm-init')
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver25
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername1
-rwxr-xr-xmeta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm10
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf1
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in7
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in (renamed from meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service)4
6 files changed, 40 insertions, 8 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 @@
1#!/bin/sh
2
3# This script is only needed to make sure /etc/X11/xserver-common
4# can affect XSERVER, ARGS & DPI: otherwise systemd could just use
5# /etc/default/xserver-nodm as EnvironmentFile and sysvinit could just
6# source the same file
7
8. /etc/profile
9
10# load default values for XSERVER, ARGS, DISPLAY...
11. /etc/default/xserver-nodm
12
13# Allow xserver-common to override ARGS, XSERVER, DPI
14if [ -e /etc/X11/xserver-common ] ; then
15 . /etc/X11/xserver-common
16 if [ ! -e $XSERVER ] ; then
17 XSERVER=$(which $XSERVER)
18 fi
19fi
20
21if [ -n "$DPI" ] ; then
22 ARGS="$ARGS -dpi $DPI"
23fi
24
25exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
deleted file mode 100644
index 7060e5ec16..0000000000
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
+++ /dev/null
@@ -1 +0,0 @@
1xuser
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
26case "$1" in 26case "$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
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf
deleted file mode 100644
index 3c0582a87e..0000000000
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf
+++ /dev/null
@@ -1 +0,0 @@
1HOME=/home/root
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
new file mode 100644
index 0000000000..757c23d95a
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
@@ -0,0 +1,7 @@
1# common environment file for sysvinit and systemd
2
3XSERVER=/usr/bin/Xorg
4DISPLAY=:0
5ARGS=" -br -pn @BLANK_ARGS@ "
6HOME=@HOME@
7USER=@USER@
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 62d979f1d6..324a26f549 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -2,9 +2,9 @@
2Description=Xserver startup without a display manager 2Description=Xserver startup without a display manager
3 3
4[Service] 4[Service]
5User=root
6EnvironmentFile=/etc/default/xserver-nodm 5EnvironmentFile=/etc/default/xserver-nodm
7ExecStart=/etc/X11/Xserver 6User=@USER@
7ExecStart=/etc/xserver-nodm/Xserver
8 8
9[Install] 9[Install]
10Alias=display-manager.service 10Alias=display-manager.service