diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-06-08 14:10:41 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-06-10 15:59:11 -0400 |
commit | 5cb44f6387de341ef254d33f76ec26e164a5ee0d (patch) | |
tree | 7162f9a06bd7ec0a5af20d8209ad22d7f77bdfef /gnome-settings-daemon/gnome-settings-daemon-localeexec.in | |
parent | f33795869e2ef58b55b112ea9caa86c975265fcb (diff) | |
download | gnome-settings-daemon-5cb44f6387de341ef254d33f76ec26e164a5ee0d.tar.gz |
Avoid calling setenv after starting threads
In particular, we can't get the locale value out of GSettings
in order to set LC_PAPER etc, since calling into GSettings
initializes the dconf backend which in turn uses gdbus, which
starts a worker thread.
As a simple workaround, set up the locale environment in
a small wrapper script that then exec's the g-s-d binary.
https://bugzilla.gnome.org/show_bug.cgi?id=701322
Diffstat (limited to 'gnome-settings-daemon/gnome-settings-daemon-localeexec.in')
-rwxr-xr-x | gnome-settings-daemon/gnome-settings-daemon-localeexec.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gnome-settings-daemon/gnome-settings-daemon-localeexec.in b/gnome-settings-daemon/gnome-settings-daemon-localeexec.in new file mode 100755 index 00000000..1aca8439 --- /dev/null +++ b/gnome-settings-daemon/gnome-settings-daemon-localeexec.in @@ -0,0 +1,19 @@ +#! /bin/bash + +SETTING=$(gsettings get org.gnome.system.locale region) +REGION=${SETTING//\,/} + +if [ -n "$REGION" ]; then + export LC_TIME=$REGION + export LC_NUMERIC=$REGION + export LC_MONETARY=$REGION + export LC_MEASUREMENT=$REGION + export LC_PAPER=$REGION +fi + +if [ -x @prefix@/bin/ibus-daemon ]; then + export QT_IM_MODULE=ibus + export XMODIFIERS=@im=ibus +fi + +exec @libexecdir@/gnome-settings-daemon |