[Xfce4-commits] <xfce4-session:master> Skip gpg/ssh-agent if GNOME compat is enabled and gnome-keyring found.
Nick Schermer
noreply at xfce.org
Mon Apr 23 20:08:01 CEST 2012
Updating branch refs/heads/master
to 67b772364c9e9a7ea9cc4dafb219902c6c8b074a (commit)
from a6f4e2ab2ec0cba9fb00254cd689df9d67678c1a (commit)
commit 67b772364c9e9a7ea9cc4dafb219902c6c8b074a
Author: Nick Schermer <nick at xfce.org>
Date: Mon Apr 23 19:59:43 2012 +0200
Skip gpg/ssh-agent if GNOME compat is enabled and gnome-keyring found.
xfce4-session/xfsm-startup.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index 80f644f..911eec6 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)
More information about the Xfce4-commits
mailing list