diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c index 76eef86..a10369d 100644 --- a/xfce4-session/xfsm-startup.c +++ b/xfce4-session/xfsm-startup.c @@ -201,6 +201,8 @@ xfsm_startup_init (XfconfChannel *channel) gchar *ssh_agent_path = NULL; gchar *gpg_agent_path = NULL; gchar *cmd; + gchar *cmdoutput = NULL; + GError *error = NULL; pid_t agentpid; gboolean gnome_keyring_found; @@ -281,8 +283,14 @@ xfsm_startup_init (XfconfChannel *channel) cmd = g_strdup_printf ("%s -s", ssh_agent_path); /* keep this around for shutdown */ running_sshagent = xfsm_startup_init_agent (cmd, "ssh-agent"); + /* update dbus environment -- https://bugs.archlinux.org/task/46398 */ + cmd = g_strdup_printf ("%s", "dbus-update-activation-environment --systemd SSH_AUTH_SOCK"); + g_spawn_command_line_sync (cmd, &cmdoutput, NULL, NULL, &error); + g_free (cmd); g_free (ssh_agent_path); + if (cmdoutput != NULL) { g_free(cmdoutput); } + if (error != NULL) { g_error_free(error); } } }