Add workaround for wsl systemd bus issue

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-09-10 09:48:15 +00:00
parent 24d31f6881
commit f960808cc7
2 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
# shellcheck shell=bash
user_bus="${DBUS_SESSION_BUS_ADDRESS#unix:path=}"
if [ -S "$user_bus" ]; then
exec zsh
fi
until [ -S /run/dbus/system_bus_socket ]; do
sleep 0.1
done
sudo systemctl restart "user@${UID}.service"
exec zsh