mrrl-logincaps

MRRL version of logincaps
git clone https://ccx.te2000.cz/git/mrrl-logincaps
Log | Files | Refs

commit bcd149b097c5af051ab11d0731d74b8306be4e51
parent 85295ea37c41735f92b30d6082135887275dd440
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Sat, 25 May 2019 02:49:06 +0200

X session termination handler
Diffstat:
Msbin/logincaps | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/sbin/logincaps b/sbin/logincaps @@ -30,6 +30,23 @@ run_x() { pretendrun chmod 600 /run/Xauthority.$X pretendrun chown $USER /run/Xauthority.$X pretendrun cat /run/service/X$X/data/Xauthority \> /run/Xauthority.$X + pretendrun env XSVC=/run/service/X$X execlineb -s0 -c ' +fdmove -c 1 2 +redirfd -r 0 /dev/null +multisubstitute { + importas HOME HOME + importas USER USER + importas XSVC XSVC +} +ifthenelse -s { test -d $HOME } { + cd $HOME +} { + cd / +} + background { + pipeline { s6-svc -wd -c $XSVC } + s6-setuidgid $USER $@ +}' "$@" } main() {