libappnotify3 breaks onboard tray icon

Asked by David López on 2012-09-30

Hi. I don't know if it's the right place to ask this question. I'm using onboard 0.98 with Arch linux, lxde and openbox. it minimizes perfectly to tray: Moreover, a single click hides/unhides onboard

Some others indicators as in indicator-ubuntuone or weather-indicator need libappnotify3. However if I install it then the onboard tray indicator works bad, see The icon is missing and now a single click doesn't hide/unhide, it opens menu just like right click

I've read about a missing icon in mint and gnome fallback, I don't know if it is the same problem. Is this a onboard or libappnotify3 bug?

Question information

English Edit question
Onboard Edit question
No assignee Edit question
Solved by:
David López
Last query:
Last reply:
marmuta (marmuta) said : #1

Hi, thanks for the question.
I believe libappindicator has taken over the job of displaying Onboard's status icon in many desktop environments. AppIndicator doesn't allow us to hide/unhide on left or right click, that's just how it's designed. Only middle clicks reach applications, so Onbord uses them to hide/unhide now.

There are a couple of options to still show Onboard on left click:
- keep a launcher in the panel; trying to launch Onboard a second time will unhide an existing instance.
- enable the floating icon in preferences
- uninstall libappindicator; Onboard will use its own status icon and fall back to the old behavior

The missing icon in lxde is most likely the same issue as that mint/gnome fallback bug in Onbord. On Ubuntu they are all using libappindicator now, which comes with its own ideas for icon naming.
This should be fixed in the just released Onboard 0.98.1.

It may not help a lot on Arch, but Francesco has already packaged the new release for our stable PPA

Thank you very much, marmuta, you have perfectly explained. Onboard 0.98.1 is still not in the arch repository, but I've built from sources and I can confirm that the missing icon kssue is solved (I use lxde with openbox).

I'm afraid I need libnotify as it's a dependance of indicator-ubuntuone. As you told me, I can use a launcher to unhide with only one click, however I've noticed that unhiding from the icon is clearly faster than unhiding from the launcher.
Maybe in a faster computer it will be unappreciable, but in my tablet the difference is clear:

- Unhiding from the icon is almost instantly, it requires about 0.5 seconds
- Unhiding calling 'onboard' (from a launcher, from terminal, with an easystroke gesture) has a lag of about 1.5 seconds

Do you have any idea what causes the difference? It seems that unhide from the icon don't simply execute 'onboard' because it's faster. Do you know what exactly invokes unhiding from the icon? Thanks.

marmuta (marmuta) said : #3

The difference is that the status icon just sends messages (via D-Bus in the case of libappindicator) to a existing Onboard instance, whereas the launcher actually executes Onboard again. That second execution is cut short and doesn't do a lot, but there's still python to be started and modules to be imported.

If you can't uninstall libappindicator, it may be worth a try to just get rid of its introspection data. Don't know if those are separate on Arch, but on Ubuntu 12.10 it would be
$ sudo apt-get remove gir1.2-appindicator3-0.1
This may or may not break other apps, though, if they don't provide their own status icon fallbacks.

Since you're building from source, there is one more option: Onboard trunk (not 0.98.x) has a D-Bus interface for showing/hiding, some documentation is in the README.
$ dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show
Having this command in a launcher should be more efficient than the regular launcher.

Eventually, we should perhaps add some option to Onboard and make appindicator optional. I can see this issue bugging people outside of Ubuntu's main desktop(s). Perhaps a combo box with three choices instead of the check box "Show status icon"...

I uninstall some libappindicator dependances but it doesn't work in Arch. However I've compiled the trunk version and tried your 'dbus-send' solution, and it works great. I've assigned to an easystroke gesture and it's really fast, almost imperceptible. With the easystroke gesture in fact I don't need to use the icon, but maybe a check box in the preferences will be nice for other users.

I've posted a lot of questions and bugs this year and the onboard devs always give great solutions in few time. My tablet would be useless without a good virtual keyboard, and yours is great. It was great in ubuntu with unity, but I had to move to a lighter environment (arch+lxde) and onboard is still great. So let me thank you for your work.

marmuta (marmuta) said : #5

You're welcome, thank you for your kind words. Yet another use case for the D-Bus service, who would have thought. Good idea linking it to a gesture.

One request: I've recently worked on speeding up typing.
Trunk is supposed to slash CPU use in half, but I'm not sure if it's fast enough yet to close that bug. If you notice it makes a difference on your tablet, perhaps leave a comment there, please. Any dropped key strokes or unexpected key repeats?