Skip to content

Commit

Permalink
lighdm: Rebuild to read bash init scripts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Aug 21, 2019
1 parent d182c0e commit ee684e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lightdm.be0
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee684e9

Please sign in to comment.