Bug 378342 - Input Method Panel doesn't seem to work
Summary: Input Method Panel doesn't seem to work
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Kimpanel (show other bugs)
Version: 5.18.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-01 14:06 UTC by Nate Graham
Modified: 2022-09-24 19:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2017-04-01 14:06:58 UTC
Distro: openSUSE Tumbleweed
KDE Plasma version: 5.9.4
plasma5-addons version:  5.9.4
Ibus version: 1.5.14
QT version: 5.7.1

I'm trying to enable some type of systemwisde Emoji input panel, and I ran across the Input Method Panel widget and figured I'd give it a try.

So I added the Input Method Panel widget to my bottom panel, but it doesn't seem to work. It has no icon, and left-clicking on it does nothing. Right-clicking on it brings up a menu with relevant-looking menu items "Configure input method" "reload config" and "Edit input method". However, clicking on any of them seems to produce no discernable output or change.

Needless to say, this is a somewhat disappointing user experience.
Comment 1 Eike Hein 2017-04-02 21:37:19 UTC
Most likely your distro set up ibus in a way that makes the GTK+ ibus tray icon interfere with Plasma's frontend.
Comment 2 Eike Hein 2017-04-02 21:37:58 UTC
(That said, I agree it would be nice if we made a better attempt at handling ibus config upstream.)
Comment 3 Weng Xuetian 2017-04-04 06:44:49 UTC
try 

ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel -r -x

and see if it works, if it helps, you could try to add it to the autostart. You might need to fix the path based on your distro. IBus does support a xml file to have panel information registered, but if there's no applet, it won't be able to fallback to the gtk version automatically. And the start up order is different on distro so I found shipping such a file would be problematic (no ui if there's no such an applet running).
Comment 4 Nate Graham 2017-04-04 15:02:42 UTC
On openSUSE Tumbleweed, kimpanel seems to be at /usr/lib64/libexec/kimpanel-ibus-panel, so I try this:

ibus-daemon --panel=/usr/lib64/libexec/kimpanel-ibus-panel -r -x

And that works! Immediately the plasmoid gets an icon and all functionality works.

So whose bug is this now? Yours, to adjust the path on openSUSE? Or OpenSUSE's, to patch the package to change the path?
Comment 5 Nate Graham 2017-04-04 15:03:10 UTC
s/Yours/KDE's/
Comment 6 Weng Xuetian 2017-04-04 20:12:02 UTC
I don't really know. If I install a xml configuration for ibus, ibus would just choose it in a random way. It's not guaranteed which one is chosen (gtk, or kimpanel). If a user has multiple desktop installed, running the kimpanel won't be a good choice under the platform without such an applet.

Also, unlike fcitx, the if the panel got removed it won't be able to fallback to something reasonable.

There's too much components that may start in different order, which may also quite depending on the distro.

The best thing you can do right now is add an autostart desktop file with the command above.
Comment 7 Eike Hein 2017-04-04 20:16:58 UTC
Maybe ibus needs a QPA-like system where the plugins are asked if they want to be loaded, and then we make our plugin do so if the KDE_FULL_SESSION var is true.

Or a DBus API to switch the panel program at runtime.
Comment 8 Weng Xuetian 2017-04-04 20:25:30 UTC
Well, it doesn't really need that to support it.

I filed a bug for https://github.com/ibus/ibus/issues/1919 .

If that's solved, I could put some code in kimpanel and make it detect whether ibus is running and kick the gtk panel away with dbus magic. The problem is that ibus-ui-gtk3 will just keep running (and leave a useless tray icon), and that what this bug report for.
Comment 9 Weng Xuetian 2017-04-05 20:49:25 UTC
Ok, seems dbus request name will queue up even if the name is lost. Good to know that. So it will be able actually fallback to existing running gtk panel. Though, there's still a small issue need to be fixed on ibus side. But now we can make the ibus panel to be started by plasmashell.
Comment 10 Weng Xuetian 2017-04-05 20:51:41 UTC
Git commit 6e03b6f5465a5df6135be1795b33f8fd50483ced by Weng Xuetian.
Committed on 05/04/2017 at 20:45.
Pushed by xuetianweng into branch 'master'.

kimpanel: add a ibus panel launcher.

Launcher will wait for ibus start and launch the panel then quit.
Launcher is started by dataengine. Also this change make kimpanel's
panel quit when dataengine disappears (applet removable will trigger
it). DBus magic will actually be able to fallback it to the running gtk3
panel.
FIXED-IN: 5.10

M  +1    -0    applets/kimpanel/backend/CMakeLists.txt
M  +11   -2    applets/kimpanel/backend/ibus/CMakeLists.txt
A  +6    -0    applets/kimpanel/backend/ibus/config-kimpanel.h.cmake
M  +9    -2    applets/kimpanel/backend/ibus/ibus15/app.cpp
M  +4    -2    applets/kimpanel/backend/ibus/ibus15/app.h
A  +90   -0    applets/kimpanel/backend/ibus/launcher.cpp     [License: LGPL (v2+)]
M  +3    -0    dataengines/kimpanel/CMakeLists.txt
A  +6    -0    dataengines/kimpanel/config-kimpanel.h.cmake
M  +3    -0    dataengines/kimpanel/kimpanelagent.cpp
M  +1    -0    dataengines/kimpanel/kimpanelagent.h
M  +14   -0    dataengines/kimpanel/kimpaneldataengine.cpp
M  +1    -0    dataengines/kimpanel/org.kde.impanel.xml

https://commits.kde.org/plasma-desktop/6e03b6f5465a5df6135be1795b33f8fd50483ced
Comment 11 Nate Graham 2017-04-06 01:51:00 UTC
Excellent!
Comment 12 Weng Xuetian 2017-04-06 15:52:02 UTC
(In reply to Nate Graham from comment #11)
> Excellent!

Just FYI, there's a upstream ibus bug: https://github.com/ibus/ibus/issues/1919

that may gives you a leftover old icon in the tray. for now you may use the system tray feature to hide it.
Comment 13 fujiwara 2018-01-15 13:15:23 UTC
Why is kimpanel enabled by default?
I think ibus-ui-gtk3 is much better.
This way also disables IBus emoji input panel.
Comment 14 Eike Hein 2018-01-16 07:14:35 UTC
ibus-ui-gtk3 doesn't integrate well with Plasma. It also only supports ibus and doesn't support fcitx.
Comment 15 fujiwara 2018-01-17 05:10:12 UTC
(In reply to Eike Hein from comment #14)
> It also only supports ibus and doesn't support fcitx.

Of course, ibus-ui-gtk3 supports ibus only and I think kimpanel-ibus-panel too.
The kimpanel lacks lots of the features. You could compare panel.cpp:on_bus_acquired() in kimpanel and panel.vala:init_settings() in ibus-ui-gtk3.

Especially kimpanel lacks IME switcher window and if an IME's layout is "default", the engine inherits the previous layout in XKB engine so no switcher causes the unexpected layout for some IMEs.
Also kimpanel can hide the icon with the right click menu only but not a pre-setting.
Also recently I decided to migrate IBusConfig to GSettings in all IBus clients as I already submitted the patch in bus.kde.org.

You can still use with ibus-daemon --panel=kimpanel but is you still dispatch the some bugs in kimpanel, I may think to disable it.