Skip to content

Commit 4598b7c

Browse files
authored
fix: start gnome-keyring before cosmic-session & export SSH_AUTH_SOCK
1 parent e1430bd commit 4598b7c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

data/start-cosmic

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,20 @@ if command -v systemctl >/dev/null; then
4242
# set environment variables for new units started by user service manager
4343
systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP DCONF_PROFILE
4444
fi
45-
# Run cosmic-session
46-
if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then
47-
exec /usr/bin/dbus-run-session -- /usr/bin/cosmic-session
48-
else
49-
exec /usr/bin/cosmic-session
50-
fi
5145

5246
# Start gnome keyring components if the daemon is active
5347
# -> check if /run/user/$UID/keyring exists
5448
if [ -d "/run/user/$(id -u)/keyring" ]; then
5549

5650
# start pkcs11, secrets, and ssh components
5751
/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
52+
export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
5853

5954
fi
55+
56+
# Run cosmic-session
57+
if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then
58+
exec /usr/bin/dbus-run-session -- /usr/bin/cosmic-session
59+
else
60+
exec /usr/bin/cosmic-session
61+
fi

0 commit comments

Comments
 (0)