Comment 1 for bug 475530

Revision history for this message
Yaohan Chen (yaohan-chen) wrote : Re: KIMPanel is unusable in Kubuntu 9.10

I had to do the following to make the kimpanel plasmoid work with ibus:

1. Install kimpanel's ibus backend, which is not included in the Ubuntu package.

wget 'http://websvn.kde.org/*checkout*/trunk/KDE/kdeplasma-addons/applets/kimpanel/backend/ibus/panel.py'
sudo mkdir /usr/share/ibus/ui/kimpanel
sudo cp panel.py /usr/share/ibus/ui/kimpanel

2. Make ibus-daemon use kimpanel. I do this by restarting ibus-daemon with the --panel parameter after KDE starts. There are notes about this at the bottom

cat > ~/.kde/Autostart/reload-ibus-daemon <<EOF
#!/bin/sh
pkill ibus-daemon &&
ibus-daemon --panel=/usr/share/ibus/ui/kimpanel/panel.py --xim
EOF
chmod +x ~/.kde/Autostart/reload-ibus-daemon

3. Symlink /usr/share/icons/hicolor/scalable/apps/ibus.svg to /usr/share/ibus/icons, where kimpanel looks for ibus's icon. The directory was created by ibus's package, but it is empty.

cd /usr/share/ibus/icons
sudo ln -s /usr/share/icons/hicolor/scalable/apps/ibus.svg

Note
Initially I just edited /etc/X11/xinit/xinput.d/ibus to change XIM_ARGS to XIM_ARGS="--xim --panel=/usr/share/ibus/ui/kimpanel/panel.py", and expected ibus to use kimpanel. However, this did not work. I think it is because ibus-daemon is being started before the kimpanel widget is loaded, therefore, I used the workaround of restarting ibus-daemon after KDE starts, based on a Chinese blog post, <http://songlinyi.spaces.live.com/blog/cns!9D1E6496716547EE!238.entry>. If this is actually the cause, maybe ibus needs to be modified to wait for the panel to be loaded, or Ubuntu needs to have a way to delay launching ibus-daemon until KDE is fully loaded?