fcitx/xim.d-fcitx
Ray chen 13b3c4c64b Accepting request 209734 from home:swyear:branches:M17N
- workaround bnc#853063: gnome-settings-daemon reset XMODIFIERS and 
  QT_IM_MODULE problem

OBS-URL: https://build.opensuse.org/request/show/209734
OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=81
2013-12-09 09:24:04 +00:00

35 lines
867 B
Plaintext

if ! type -p fcitx > /dev/null 2>&1 ; then
echo "fcitx is not installed. please run `sudo zypper in fcitx`."
return 1
fi
#make sure set these vars before dbus-launch
export LC_CTYPE=$LANG
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=fcitx
export GTK3_IM_MODULE=fcitx
export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=fcitx
# Avoid relying on autolaunch to improvise D-Bus sessions for each process
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
fcitx -d
#workaround for bnc#853063
case "$WINDOWMANAGER" in
/usr/bin/gnome-session)
#force disable keyboard plugins in gnome-settings-daemon
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
echo "NOTE: keyboard plugin had been disabled"
;;
*)
#do nothing
;;
esac
# success:
return 0