Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock
Please unblock package im-config
This will fix
* http://bugs.debian.org/683950
* http://bugs.debian.org/300486
* Fundamental X initialization sequence/timing problem for the input
method at its root cause.
Diff is attached but git repo may be easier:
Vcs-Git: git://git.debian.org/git/collab-maint/im-config.git
Vcs-browser: http://git.debian.org/?p=collab-maint/im-config.git
===
This looks large patch but it is essentially simple minded code to
reorder X start up process in /etc/X11/Xsession.d/. (Diff attached)
Let me explain why this is needed and what is all about.
Non-european languages use input method to input their key strokes into
applications. Its initialization is done during X start up by a hook
script provided by im-config.
There was a long standing bug in im-switch (previous version of hook
script) /im-config, where the input method hook script was executed
after the dbus hook script. This looked good until we found out that
actual execution of dbus initialization is delayed until the last
99x11-common_start of the initialization with a tricky substitution use
of $STARTUP string.
Not knowing this was the root cause, when people had had problem getting
input method daemons started, we put some delay/waiting somewhere in the
code (sometimes daemon itself, sometimes within hook script.). See
http://bugs.debian.org/300486 . 10 second wait implemented in im-config
was OK workaround for many system using uim but it is guaranteed to fail
on very slow system.
The bug report http://bugs.debian.org/683950 got me rethink this
initialization in /etc/X11/Xsession.d/.
Old way in 0.17:
* 50x11-common_determine-startup STARTUP=/usr/bin/x-session-manager
* 75dbus_dbus-launch STARTUP=$DBUSLAUNCH --exit-with-session
$STARTUP
* 80im-config_launch starting input method daemon etc.
* 99x11-common_start exec $STARTUP
New way in 0.18:
* 50x11-common_determine-startup STARTUP=/usr/bin/x-session-manager
* 70im-config_launch STARTUP=/usr/bin/im-launch $STARTUP
* 75dbus_dbus-launch STARTUP=$DBUSLAUNCH --exit-with-session
$STARTUP
* 99x11-common_start exec $STARTUP
Practically, the entire content of old 80im-config_launch is moved into
/usr/bin/im-launch where daemon is started etc.
Since there is no more need to delay uim start, delay is dropped.
Since /etc/X11/Xsession.d/*im-config_launch is conffile, I extended
the existing postinst script handling of moving such file safely. (I
know there is another way but I tried not to make too new changes.)
==
unblock im-config/0.18
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (10, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.5-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru im-config-0.17/70im-config_launch im-config-0.18/70im-config_launch
--- im-config-0.17/70im-config_launch 1970-01-01 09:00:00.0 +0900
+++ im-config-0.18/70im-config_launch 2012-08-11 15:55:23.0 +0900
@@ -0,0 +1,18 @@
+#!/bin/sh
+# vim: set sts=4 expandtab:
+# Copyright (C) 2012 Osamu Aoki os...@debian.org
+# Copyright (C) 2012 Aron Xu a...@debian.org
+# GNU General Public License version 2 or later.
+#
+# Input Method launcher hook ... see im-launch(1).
+# The hook script for dbus-launch is in 75 which changes $STARTUP string.
+# This shuld be befor this dbus-launch hook to ensure the working dbus
+# for input method. Thus moved from 80 to 70.
+
+IMLAUNCH=/usr/bin/im-launch
+
+# Change $STARTUP string to im-launch while keeping the old $STARTUP string
+# as its arguments
+if [ -x $IMLAUNCH ]; then
+STARTUP=$IMLAUNCH $STARTUP
+fi
diff -Nru im-config-0.17/80im-config_launch im-config-0.18/80im-config_launch
--- im-config-0.17/80im-config_launch 2011-12-05 23:44:29.0 +0900
+++ im-config-0.18/80im-config_launch 1970-01-01 09:00:00.0 +0900
@@ -1,31 +0,0 @@
-#!/bin/sh
-# vim: set sts=4 expandtab:
-# Copyright (C) 2010 Osamu Aoki os...@debian.org
-# GNU General Public License version 2 or later.
-#
-# Input Method for X, GNOME, KDE, ... see im-config(8).
-
-# If already tweaked, keep hands off :-)
-# If im-config is removed but not purged, keep hands off :-)
-if [ -z $XMODIFIERS ] \
- [ -z $GTK_IM_MODULE ] \
- [ -z $QT_IM_MODULE ] \
- [ -z $QT4_IM_MODULE ] \
- [ -z $CLUTTER_IM_MODULE ] \
- [ -r /usr/share/im-config/xinputrc.common ]; then
-# initialize all im-config common functions and parameters
-. /usr/share/im-config/xinputrc.common
-# source the first found configuration file
-if [ -r $IM_CONFIG_XINPUTRC_USR ]; then
-. $IM_CONFIG_XINPUTRC_USR
-elif