From ec64522110482f44987028135361a88bfdbe5a61 Mon Sep 17 00:00:00 2001 From: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com> Date: Tue, 6 Jan 2026 06:26:44 +0530 Subject: [PATCH] fix: add SSH_AUTH_SOCK to systemd import-environment Move the systemctl import-environment call after keyring setup so the SSH_AUTH_SOCK variable exists before being imported into the user service manager. Remove the earlier duplicate import block. --- data/start-cosmic | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/start-cosmic b/data/start-cosmic index 726b4ee..a0ea0d0 100755 --- a/data/start-cosmic +++ b/data/start-cosmic @@ -38,11 +38,6 @@ export QT_AUTO_SCREEN_SCALE_FACTOR=1 export QT_ENABLE_HIGHDPI_SCALING=1 export DCONF_PROFILE=cosmic -if command -v systemctl >/dev/null; then - # set environment variables for new units started by user service manager - systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP DCONF_PROFILE -fi - # Start gnome keyring components if the daemon is active # -> check if /run/user/$UID/keyring exists if [ -d "/run/user/$(id -u)/keyring" ]; then @@ -58,6 +53,11 @@ if [ -d "/run/user/$(id -u)/keyring" ]; then export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh" fi +if command -v systemctl >/dev/null; then + # set environment variables for new units started by user service manager + systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP DCONF_PROFILE SSH_AUTH_SOCK +fi + # Run cosmic-session if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then exec /usr/bin/dbus-run-session -- /usr/bin/cosmic-session