summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-04-23 19:59:43 +0200
committerNick Schermer <nick@xfce.org>2012-04-23 20:07:15 +0200
commit67b772364c9e9a7ea9cc4dafb219902c6c8b074a (patch)
tree904bb63371cf91b8fc2ced5f998e4e02adb70b37
parenta6f4e2ab2ec0cba9fb00254cd689df9d67678c1a (diff)
downloadxfce4-session-67b772364c9e9a7ea9cc4dafb219902c6c8b074a.tar.gz
Skip gpg/ssh-agent if GNOME compat is enabled and gnome-keyring found.
-rw-r--r--xfce4-session/xfsm-startup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index 80f644fe..911eec69 100644
--- a/xfce4-session/xfsm-startup.c
+++ b/xfce4-session/xfsm-startup.c
@@ -153,9 +153,28 @@ xfsm_startup_init (XfconfChannel *channel)
gchar *cmd;
const gchar *ssh_agent_pid;
pid_t pid;
+ gboolean gnome_keyring_found;
if (xfconf_channel_get_bool (channel, "/startup/ssh-agent/enabled", TRUE))
{
+ /* if GNOME compatibility is enabled and gnome-keyring-daemon
+ * is found, skip the gpg/ssh agent startup and wait for
+ * gnome-keyring, which is probably what the user wants */
+ if (xfconf_channel_get_bool (channel, "/compat/LaunchGNOME", FALSE))
+ {
+ cmd = g_find_program_in_path ("gnome-keyring-daemon");
+ gnome_keyring_found = (cmd != NULL);
+ g_free (cmd);
+
+ if (gnome_keyring_found)
+ {
+ g_print ("xfce4-session: %s\n",
+ "GNOME compatibility is enabled and gnome-keyring-daemon is "
+ "found on the system. Skipping gpg/ssh-agent startup.");
+ return;
+ }
+ }
+
agent = xfconf_channel_get_string (channel, "/startup/ssh-agent/type", NULL);
if (g_strcmp0 (agent, "gpg-agent") == 0
|| g_strcmp0 (agent, "ssh-agent") == 0)