[Pkg-ime-devel] Bug#683950: im-config: alter the way of starting during Xsession startup

Osamu Aoki osamu at debian.org
Tue Aug 7 10:42:33 UTC 2012


On Mon, Aug 06, 2012 at 08:31:03PM +0800, Aron Xu wrote:
> On Mon, Aug 6, 2012 at 8:08 PM, Osamu Aoki <osamu at debian.org> wrote:
...
> > "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.

As I see your code more carefully, you are making another process with
"$@ &" and continuing process.... instead of initializing and starting
x-session-manager with the exec command.

I initially thought your "$@ &" to be at the end of script with:

exec $@

But this was not the case.

Since this script is run by dbus, this may be still good and does not
leave any extra process.  I also do not understand purpose of infinite
loop at the end without wait.  At least waiting every few seconds should
reduce CPU load....   Anyway, I have to admit I have not evaluated all
the options.  

By the way what is the process tree of your system?  My system around gdm3 and ibus are:
$ ps auxf |less
....
root      4005  0.0  0.0  83756  3168 ?        Sl   Aug06   0:00 /usr/sbin/gdm3
root      4042  0.0  0.1 105168  4704 ?        Sl   Aug06   0:00  \_ /usr/lib/gdm3/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
root      4163  0.8  0.4 119756 18708 tty7     Rs+  Aug06  12:03      \_ /usr/bin/Xorg :0 -br -verbose -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-fcev7l/database -nolisten tcp vt7
root      5124  0.0  0.1 193060  4640 ?        Sl   Aug06   0:00      \_ gdm-session-worker [pam/gdm3]
osamu     5159  0.0  0.2 346556 10712 ?        Ssl  Aug06   0:01          \_ x-session-manager
osamu     5208  0.0  0.0      0     0 ?        Z    Aug06   0:00              \_ [xbrlapi] <defunct>
osamu     5253  0.0  0.0  12372   332 ?        Ss   Aug06   0:00              \_ /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
osamu     5268  0.0  0.4 752648 19500 ?        Sl   Aug06   0:06              \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon
osamu     5324  0.0  0.0  24624  1172 ?        S    Aug06   0:03              |   \_ syndaemon -i 2.0 -K -R -t
osamu     5322  0.5  4.4 1249552 177252 ?      Rl   Aug06   7:37              \_ /usr/bin/gnome-shell
osamu    10560  0.1  0.5 487508 21472 ?        Sl   18:21   0:06              |   \_ gnome-terminal
osamu    10566  0.0  0.0  14536   820 ?        S    18:21   0:00              |       \_ gnome-pty-helper
osamu    10567  0.0  0.1  21644  4528 pts/0    Ss   18:21   0:00              |       \_ bash
osamu    11667  0.0  0.1  84248  7856 pts/0    S+   18:23   0:00              |       |   \_ mutt
osamu    13436  0.0  0.0   4164   580 pts/0    S+   19:24   0:00              |       |       \_ sh -c vim -c 'set tw=72 et ft=mail' '/tmp/mutt-goofy-1000-11667-1220024902342815162'
osamu    13437  0.0  0.2 240828 10220 pts/0    Sl+  19:24   0:00              |       |           \_ vim -c set tw=72 et ft=mail /tmp/mutt-goofy-1000-11667-1220024902342815162
osamu    13484  0.0  0.1  21660  4552 pts/1    Ss   19:27   0:00              |       \_ bash
osamu    13602  0.0  0.0  17140  1456 pts/1    R+   19:31   0:00              |           \_ ps auxf
osamu    13603  0.0  0.0   7884  1012 pts/1    S+   19:31   0:00              |           \_ less
osamu     5331  0.0  0.6 270032 24760 ?        S    Aug06   0:00              \_ /usr/bin/python /usr/bin/system-config-printer-applet
osamu     5332  0.0  0.8 222184 35252 ?        SNl  Aug06   0:04              \_ /usr/lib/tracker/tracker-miner-fs
osamu     5333  0.0  0.3 381680 12772 ?        Sl   Aug06   0:02              \_ update-notifier
osamu     5334  0.0  0.4 426384 16080 ?        Sl   Aug06   0:00              \_ /usr/lib/evolution/3.4/evolution-alarm-notify
osamu     5335  0.0  0.1 157748  7852 ?        S    Aug06   0:00              \_ kerneloops-applet
osamu     5337  0.0  0.3 479536 15124 ?        Sl   Aug06   0:00              \_ nm-applet
osamu     5338  0.0  0.2 199312 10096 ?        S    Aug06   0:00              \_ /usr/lib/gnome-disk-utility/gdu-notification-daemon
osamu     5345  0.0  0.4 264832 15916 ?        Sl   Aug06   0:00              \_ /usr/lib/tracker/tracker-store
osamu     5352  0.0  0.8 723340 32436 ?        Sl   Aug06   0:04              \_ nautilus -n
osamu     5358  0.0  0.3 363600 13060 ?        Sl   Aug06   0:02              \_ gnome-screensaver
....
osamu     5220  0.0  0.1 203224  4424 ?        Ssl  Aug06   1:05 /usr/bin/ibus-daemon --daemonize --xim
osamu     5221  0.0  0.0 127188  3448 ?        Sl   Aug06   0:00  \_ /usr/lib/x86_64-linux-gnu/ibus/ibus-gconf
osamu     5223  0.0  0.6 312020 25328 ?        S    Aug06   0:07  \_ /usr/bin/python /usr/share/ibus/ui/gtk/main.py
osamu     5237  0.0  0.1 139160  4932 ?        Sl   Aug06   0:00  \_ /usr/lib/ibus-mozc/ibus-engine-mozc --ibus
osamu    13346  0.0  0.3 105544 14364 ?        SLl  Aug06   0:00      \_ /usr/lib/mozc/mozc_server
osamu    19739  0.0  0.2 184404 11372 ?        Sl   Aug06   0:01      \_ /usr/lib/mozc/mozc_renderer

I do not have time to do more testing.... sorry.

Osamu




More information about the Pkg-ime-devel mailing list