diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c --- a/xfce4-session/xfsm-startup.c +++ b/xfce4-session/xfsm-startup.c @@ -193,16 +193,17 @@ xfsm_startup_init_agent (const gchar *cm } void xfsm_startup_init (XfconfChannel *channel) { gchar *ssh_agent; + gchar *ssh_agent_socket_path; gchar *ssh_agent_path = NULL; gchar *gpg_agent_path = NULL; gchar *cmd; pid_t agentpid; gboolean gnome_keyring_found; /* if GNOME compatibility is enabled and gnome-keyring-daemon * is found, skip the gpg/ssh agent startup and wait for @@ -273,17 +274,27 @@ xfsm_startup_init (XfconfChannel *channe else { g_unsetenv ("SSH_AGENT_PID"); g_unsetenv ("SSH_AUTH_SOCK"); } if (ssh_agent_path != NULL) { - cmd = g_strdup_printf ("%s -s", ssh_agent_path); + ssh_agent_socket_path = xfconf_channel_get_string (channel, "/startup/ssh-agent/socket", NULL); + if (ssh_agent_socket_path) + { + /* user requested a specific ssh-agent socket location */ + cmd = g_strdup_printf ("%s -s -a %s", ssh_agent_path, ssh_agent_socket_path); + g_free (ssh_agent_socket_path); + } + else + { + cmd = g_strdup_printf ("%s -s", ssh_agent_path); + } /* keep this around for shutdown */ running_sshagent = xfsm_startup_init_agent (cmd, "ssh-agent"); g_free (cmd); g_free (ssh_agent_path); } } if (G_LIKELY (gpg_agent_path != NULL))