From e2d890398f8d2c093c3360ff1d4c2d56a81ebc95 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 18 Sep 2012 16:31:42 +0100 Subject: Add systemd service to start lightdm on boot --- lightdm.morph | 6 ++++++ lightdm.service | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lightdm.service 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 + -- cgit v1.2.1