Hi,

On Mon, Aug 06, 2012 at 01:25:51AM +0800, Aron Xu wrote:
> Package: src:im-config
> Severity: wishlist
> Tags: patch

I assume this is patch aiming for Jessie.  Too late for wheezy.

> This patch alters the way of launching input methods during Xsession
> startup, as stated in the patch description:
> 
>     Traditionally im-swich and im-config start input method
                    im-switch
>     framework in parallel with Xsession startup, this leaves
>     modern input method frameworks utilizing technologies
>     like dbus in an embrassing place, i.e. it's difficult to
>     obtain the dbus session address when the input method
>     framework is not initialized after dbus.

Very true.

>     This patch alters the way of starting by introducing
>     im-launch, which is used to perform all necessary actions
>     during X session startup in a serial manner, ensuring all

"serial" ?  Hmmm... I see what you mean via the script.

As I see /etc/X11/Xsession.d, $STARTUP is setup by:

20x11-common_process-args:            STARTUP="$1"
50x11-common_determine-startup:    STARTUP=x-session-manager
75dbus_dbus-launch:  STARTUP="$DBUSLAUNCH --exit-with-session $STARTUP"
90consolekit:    STARTUP="$CK_LAUNCH_SESSION $STARTUP"
90gpg-agent:       STARTUP="$GPGAGENT --daemon --sh --write-env-file=$PID_FILE 
$STARTUP"
90x11-common_ssh-agent:  STARTUP="$SSHAGENT $SSHAGENTARGS ${TMPDIR:+env 
TMPDIR=$TMPDIR} $STARTUP"

and executed at the end as:

99x11-common_start:exec $STARTUP

Now we have $SRARTUP as:

/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager

You are talking to put im-launch here :-)  Very good idea.

>     needed facilities are ready before input method framework
>     gets launched.

Yes.  It has to start parralel process and wait for dbus etc. 

> Implementation detail here is to change the $STARTUP variable when
> Xsession is sourcing files from /etc/X11/Xsession.d/, which is the way
> that used by DBus. 

Interesting.

> By running in this way we can ensure that input
> methods are always started when the DBus session for the very X
> session is available, so input methods can obtain the address and
> connect to it reliably. It was almost a probability problems in the
> traditional way and if the input method framework starts too quick it
> will trigger DBus auto-launch, which leaves functions like IM Modules
> not working properly.

I guess $STARTUP will be like ...

/usr/bin/ssh-agent /usr/bin/im-launch -s -- /usr/bin/dbus-launch 
--exit-with-session x-session-manager

I see this is the right direction to chase.

> The patch has been tested thoroughly to make sure its free from
> undesired side effects, the only thing to be mentioned is that an
> im-launch process will be left running for every X session, which is
> necessarily what dbus-launch does.

The only questions remaining are:

 * aestetic of the command syntax for im-launch:
   this is neither ssh-agent/gpg-agent style nor dbus-launch style
 * can we think --exit-with-session so daemon will be killed upon exit
   of x-session-manager.  (Or this is not needed for im-launch)

Osamu


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to