summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-11-07 11:57:33 +0000
committerTails developers <amnesia@boum.org>2013-11-07 11:57:33 +0000
commit55cade9919ae30739f0d174ce3a3fb4301fdd4ca (patch)
treea9e4a0bbfb440caccc05835e87ab227bb4808cea
parentbd354cea3d2058483e96d7d8ea4bc4eff7c4472b (diff)
parent2f3815015fda005c7bc10f2a69ddee793ef85a1b (diff)
Merge remote-tracking branch 'winterfairy/bugfix/ibus' into devel
-rw-r--r--config/chroot_local-includes/etc/X11/Xsession.d/80im-starter36
-rw-r--r--config/chroot_local-packageslists/tails-common.list19
-rw-r--r--wiki/src/contribute/design.mdwn16
3 files changed, 63 insertions, 8 deletions
diff --git a/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter b/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter
new file mode 100644
index 0000000..51c54b5
--- /dev/null
+++ b/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# 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)
+# (bopomofo is an alternative input method for chinese)
+LANGPREFIX=`echo "$LANG" | sed 's/_.*//'`
+
+case "$LANGPREFIX" in
+ ja)
+ PREFLIST='[anthy,pinyin,hangul,bopomofo]'
+ ;;
+ ko)
+ PREFLIST='[hangul,pinyin,anthy,bopomofo]'
+ ;;
+ *)
+ PREFLIST='[pinyin,anthy,hangul,bopomofo]'
+esac
+
+# 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'
diff --git a/config/chroot_local-packageslists/tails-common.list b/config/chroot_local-packageslists/tails-common.list
index a046ead..33f74bc 100644
--- a/config/chroot_local-packageslists/tails-common.list
+++ b/config/chroot_local-packageslists/tails-common.list
@@ -236,16 +236,23 @@ xserver-xorg-video-geode
#endif
xserver-xorg-video-all
+### Input methods
+ibus-gtk
+ibus-qt4
+## Chinese
+ibus-pinyin
+## Japanese
+ibus-anthy
+## Korean
+ibus-hangul
+
### l10n, i18n
## precompiled locales
locales-all
## arabic fonts
ttf-kacst
ttf-farsiweb
-## chinese fonts and input systems
-scim-pinyin
-scim-tables-zh
-scim-uim
+## chinese fonts
xfonts-intl-chinese
ttf-arphic-ukai
ttf-arphic-uming
@@ -255,14 +262,10 @@ culmus
libfribidi0
## indic fonts
ttf-indic-fonts
-## Japanese input systems
-scim-anthy
## Khmer language, used in Cambodia
ttf-khmeros
## Korean fonts
ttf-unfonts-core
-## Korean input systems
-scim-hangul
## Lao fonts
ttf-lao
## russian fonts
diff --git a/wiki/src/contribute/design.mdwn b/wiki/src/contribute/design.mdwn
index 6bc539d..496b57a 100644
--- a/wiki/src/contribute/design.mdwn
+++ b/wiki/src/contribute/design.mdwn
@@ -748,6 +748,22 @@ are installed. Spell checking software and data is installed for the
set of best supported languages; it is usable at least is Iceweasel,
OpenOffice.org and gedit.
+### 3.3.1 Input methods
+
+Tails ships with IBus and a few engines (Anthy for Japanese, Pinyin
+and Bopomofo for Chinese, and Hangul for Korean).
+
+A login script configures and enables IBus for all locales: it must be
+started at login time to be fully usable (environment variables must
+be set up); also, one may want to work on documents written in
+Chinese, Japanese or Korean even when selecting English as their
+preferred language.
+
+When a Japanese, Chinese or Korean locale is selected, this login
+script also selects the right default input method.
+
+- [[!tails_gitweb config/chroot_local-includes/etc/X11/Xsession.d/80im-starter]]
+
## 3.4 Notification of security issues and new Tails release
Shipped in Tails is a script that checks at each desktop start if