summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-18 16:31:42 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-18 16:31:42 +0100
commite2d890398f8d2c093c3360ff1d4c2d56a81ebc95 (patch)
tree822bf5dda9faad654c75747ef1f4351cf54b20a7
parent4ac76c3883ca3f9b9d0b74ea1051fe854dc373ee (diff)
downloadlightdm-e2d890398f8d2c093c3360ff1d4c2d56a81ebc95.tar.gz
Add systemd service to start lightdm on boot
-rw-r--r--lightdm.morph6
-rw-r--r--lightdm.service14
2 files changed, 20 insertions, 0 deletions
diff --git a/lightdm.morph b/lightdm.morph
index 6b2463c1..736bda67 100644
--- a/lightdm.morph
+++ b/lightdm.morph
@@ -5,5 +5,11 @@
"configure-commands": [
"NOCONFIGURE=1 ./autogen.sh",
"./configure --prefix=\"$PREFIX\" --sysconfdir=/etc --localstatedir=/var \"$@\""
+ ],
+ "install-commands": [
+ "make DESTDIR=\"$DESTDIR\" install",
+ "mkdir -p \"$DESTDIR/lib/systemd/system/\"",
+ "cp lightdm.service \"$DESTDIR/lib/systemd/system/\"",
+ "ln -s \"$DESTDIR/lib/systemd/system/lightdm.service\" \"$DESTDIR/lib/systemd/system/multi-user.target.wants/lightdm.service\""
]
}
diff --git a/lightdm.service b/lightdm.service
new file mode 100644
index 00000000..4b17996e
--- /dev/null
+++ b/lightdm.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=lightdm display manager
+After=systemd-user-session.service
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.DisplayManager
+
+# We should do this during the install, but currently the user only
+# exists in the target system and not the build environment due to
+# the staging fillers being primitive.
+ExecStartPre=chown lightdm /var/run/lightdm
+ExecStart=/usr/sbin/lightdm
+