From ee684e9ac3abb0fa9f12ee8c0531a17165876d49 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 21 Aug 2019 16:46:55 +0200 Subject: [PATCH] lighdm: Rebuild to read bash init scripts Change shebang of /usr/bin/lightdm-session from /bin/sh to `/bin/bash --login`, so that the bash startup logic reads the same init files as a login shell in a terminal window would do. This is what users expect, so that, for example, applications started from the desktop launcher have the same environment and umask as applications started from a terminal window. The scripts executed by the login shell include /etc/profile, so we no longer need to call it explicitly. --- lightdm.be0 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lightdm.be0 b/lightdm.be0 index 43ff26712..bc46132aa 100755 --- a/lightdm.be0 +++ b/lightdm.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION lightdm-1.28.0-0 +# BEE_VERSION lightdm-1.28.0-1 SRCURL[0]="https://github.com/CanonicalLtd/lightdm/releases/download/${PKGVERSION}/lightdm-${PKGVERSION}.tar.xz" @@ -46,7 +46,14 @@ mee_configure() { mee_install_post() { - sed '/bin\/sh/ a \\n. /etc/profile' ${S}/tests/src/lightdm-session > ${D}/usr/bin/lightdm-session + cat > ${D}/usr/bin/lightdm-session <<- 'EOF' + #! /bin/bash --login + + # First argument is full command, ´for backwards compatibility'. + + exec $1 +EOF + chmod 755 ${D}/usr/bin/lightdm-session rm -rf ${D}/etc/init install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm