From 2f87f3846bf9e6e7e02db398bee1b42dc24b106f Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 14 Sep 2026 21:13:09 +0300 Subject: [PATCH] niri-session: Pass -l to the $SHELL Apparently, despite being documented in the bash reference manual and the bash manpage, the `-` prepended to `$0` does *not* make bash exec profile files in its default build configuration. It happened to work so far because distros tend to build bash with a define that makes it work as documented. I've no idea if all reasonable login $SHELLs accept -l as an argument, let's hope they do. This lets us drop dependency on bash. --- resources/niri-session | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/niri-session b/resources/niri-session index 19321e6f..a9a4d940 100755 --- a/resources/niri-session +++ b/resources/niri-session @@ -15,7 +15,7 @@ if [ -n "$SHELL" ] && ! (echo "$SHELL" | grep -q "false") && ! (echo "$SHELL" | grep -q "nologin"); then if [ "$1" != '-l' ]; then - exec bash -c "exec -l '$SHELL' -c 'exec $0 -l $*'" + exec "$SHELL" -l -c "exec $0 -l $*" else shift fi