[Pkg-ime-devel] Bug#683950: im-config: alter the way of starting during Xsession startup
Aron Xu
aron at debian.org
Mon Aug 6 12:31:03 UTC 2012
On Mon, Aug 6, 2012 at 8:08 PM, Osamu Aoki <osamu at debian.org> wrote:
> 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.
>
I'd like to try to ask release team to unblock it because starting
input method reliably is so important, and it bites people around me a
lot...
>> 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.
>
Yeah, that's the idea, and the $SRARTUP is correct.
>> 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.
>
Yes, it is.
>> 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
It's because the restrictions of getopt command, which is used to
parse the options in im-launch. I will research for better syntax or
implement the command in C, if you don't mind C.
> * 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)
>
I'm still thinking about it, but I need to find a bit more time this
weekend to work on remaining issues like the syntax and this
--exit-with-session feature.
--
Regards,
Aron Xu
More information about the Pkg-ime-devel
mailing list