[Sugar-devel] [PATCH sugar] Enable gnome-keyring to autostart in sugar-emulator
Daniel Narvaez
dwnarvaez at gmail.com
Mon Jul 2 07:52:21 EDT 2012
Sascha, Caspar,
could you see if you are happy with the patch now?
Thanks.
On 26 June 2012 12:01, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> From: Daniel Narvaez <dwnarvaez at gmail.com>
>
> We was starting it manually because dbus would not
> activate it automatically. A proper solution to that
> issue is pointed out in the following GNOME bug
>
> https://bugzilla.gnome.org/show_bug.cgi?id=628302
>
> Since we are running inside a GNOME session, we
> need to clear all the gnome-keyring environment
> variables in our child session for things to
> work properly.
> ---
> bin/sugar.in | 6 ------
> src/jarabe/util/emulator.py | 7 +++++++
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/bin/sugar.in b/bin/sugar.in
> index 12098db..2df0ab8 100644
> --- a/bin/sugar.in
> +++ b/bin/sugar.in
> @@ -62,12 +62,6 @@ export LANGUAGE="${LANGUAGE:-${LANG}}"
> # Set Sugar's telepathy accounts directory
> export MC_ACCOUNT_DIR=$HOME/.sugar/$SUGAR_PROFILE/accounts
>
> -# Workaround until gnome-keyring-daemon lets dbus activate it
> -# https://bugzilla.gnome.org/show_bug.cgi?id=628302
> -if test "$SUGAR_EMULATOR" = "yes" -a "$(type gnome-keyring-daemon)"; then
> - gnome-keyring-daemon --components=secrets &
> -fi
> -
> # Source language settings and debug definitions
> if [ -f ~/.i18n ]; then
> . ~/.i18n
> diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
> index fda1b59..db34190 100644
> --- a/src/jarabe/util/emulator.py
> +++ b/src/jarabe/util/emulator.py
> @@ -120,6 +120,13 @@ def _start_window_manager():
>
>
> def _setup_env(display, scaling, emulator_pid):
> + # We need to clear the gnome-keyring environment in our
> + # child shell to allow it to autostart and work properly.
> + for variable in ['GPG_AGENT_INFO', 'SSH_AUTH_SOCK',
> + 'GNOME_KEYRING_CONTROL', 'GNOME_KEYRING_PID']:
> + if variable in os.environ:
> + del os.environ[variable]
> +
> os.environ['SUGAR_EMULATOR'] = 'yes'
> os.environ['GABBLE_LOGFILE'] = os.path.join(
> env.get_profile_path(), 'logs', 'telepathy-gabble.log')
> --
> 1.7.10.2
>
--
Daniel Narvaez
More information about the Sugar-devel
mailing list