Hi, Am Sa, Jul 06, 2024 am 03:09:26 +0200 schrieb Paul Sopka:
This brings me to the final problem which the alternative mentioned above solves already: The user services manage a couple of things, namely the XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS that need to be propagated to the users login shell. Is there a more elegant way to do this other then having the user source an env directory in his .bash_profile?
What I do is little different: my login shell is /etc/execline-startup, which after setting up a few things, execs into ~/.execline-loginshell, which among other things execs into s6-envdir reading the same env dir as my supervision tree, and finally executes into my actual shell.
I’ll attach the files to this email so you can take a look at them.Don’t credit me on this, I actually took it all from the lh-bootstrap stuff written by Laurent. :D
BISOUS Hoël
#!/bin/execlineb -s0
/bin/multisubstitute
{
importas -i HOME HOME
importas -i LOGNAME LOGNAME
}
/bin/export USER ${LOGNAME}
/bin/s6-envdir /etc/env-startup
/bin/fdblock 0
/bin/fdblock 1
/bin/fdblock 2
/bin/tryexec { ${HOME}/.execline-loginshell $@ }
/etc/execline-shell $@
#!/bin/execlineb -s0
importas -i PATH PATH
importas -i HOME HOME
export PATH ${HOME}/.local/bin:${PATH}
s6-envdir ${HOME}/.config/env
${HOME}/.execline-shell $@
#!/bin/execlineb -s0
backtick -nx GPG_TTY { tty }
fish $@
signature.asc
Description: PGP signature
