xserver-nodm-init: add EnvironmentFile

* used to set HOME variable before /etc/X11/Xsession is started
* e.g. enlightenment is creating ${HOME}/.e and without this it ends in
  /tmp/.e and during startup HOME gets defined and switched to
  /home/root/.e

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Martin Jansa
2012-04-10 05:59:39 +00:00
committed by Koen Kooi
parent 8f6027c1bd
commit 2cb1ae5c17
3 changed files with 8 additions and 1 deletions
@@ -0,0 +1 @@
HOME=/home/root
@@ -2,6 +2,7 @@
Description=Xserver startup with a display manager Description=Xserver startup with a display manager
[Service] [Service]
EnvironmentFile=/etc/default/xserver-nodm
ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /etc/X11/Xserver ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /etc/X11/Xserver
[Install] [Install]
@@ -3,10 +3,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SECTION = "x11" SECTION = "x11"
PR = "r14" PR = "r16"
SRC_URI = "file://xserver-nodm \ SRC_URI = "file://xserver-nodm \
file://xserver-nodm.service \ file://xserver-nodm.service \
file://xserver-nodm.conf \
file://gplv2-license.patch \ file://gplv2-license.patch \
" "
S = "${WORKDIR}" S = "${WORKDIR}"
@@ -25,7 +26,11 @@ SYSTEMD_SERVICE_${PN}-systemd = "xserver-nodm.service"
do_install() { do_install() {
install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/init.d
install xserver-nodm ${D}${sysconfdir}/init.d install xserver-nodm ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default
install xserver-nodm.conf ${D}${sysconfdir}/default/xserver-nodm
} }
FILES_${PN}-systemd += "${sysconfdir}/default/xserver-nodm"
RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
RDEPENDS_${PN}-systemd += "xserver-common (>= 1.30) xinit" RDEPENDS_${PN}-systemd += "xserver-common (>= 1.30) xinit"