Commit 47bfd892 authored by WinterFairy's avatar WinterFairy
Browse files

Add a new login script that configures and enables IBus.

This login script will enable IBus for all locales,
but for Japanese, Chinese and Korean it will also select
the right default input method for that language.

This replaces im-switch, as it not only starts IBus,
but actually configures it correctly for usage in Tails.
parent a3660da9
# Start the IBus input method and configure it with
# sensible settings for use in Tails.
# The input method will be configured so it is usable
# no matter what locale the user login with, but with
# correct default engine for those locales that need it.
# Deside order in which input methods are preferred
# (chinese needs pinyin, japanese needs anthy, korean needs hangul)
LANGPREFIX=`echo "$LANG" | sed 's/_.*//'`
if [ "$LANGPREFIX" = "ja" ]; then
if [ "$LANGPREFIX" = "ko" ]; then
# Configure enabled input methods and their preferred order
gconftool-2 --type=list --list-type=string --set \
/desktop/ibus/general/preload_engines "$PREFLIST"
# Start the IBus input method daemon
/usr/bin/ibus-daemon --daemonize --xim
# Export environment variables to enable use of IBus
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="ibus"
export XMODIFIERS="@im=ibus"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment