A solution to Pidgin, Plasma5 and the missing systray icon


I found out a while back that Pidgin’s underlying library libpurple has the ability to have many functions called through dbus.  So if I can’t figure out how to get the systray icon back, could I at least poke it to show the buddy list again?  Turns out with a short bit of research and some playing around in an ipython shell with the dbus module, I was able to come up with the following (hackish) script to display the buddy list window when it accidentally gets  closed:

#!/usr/bin/env python
# coding: utf-8
import dbus
bus = dbus.SessionBus()
purple = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")

I put this in a script called “buddylist”, and call it if I ever close the buddy list window.  Works like a charm.

The longer story:

In the wake of KDE’s Plasma 5 desktop being released last year, I discovered what many did about some systray icons: they no longer appeared.  This is a problem for any application that minimizes to the systray like Pidgin does.  While it’s not hard to leave Pidgin’s buddy list (it’s main window) open, sometimes it accidentally gets closed, which means it closes down to the systray.  If the icon isn’t able to display in the systray, then all is naught, because killing pidgin and bringing it back only restarts it in the status it was last time, i.e. minimized to the systray. Google didn’t help here, because I kept finding old posts about a different systray problem from 2010, or 2013.  Great.  I had fallen into this hole of Pidgin being minimized, even on restart.  Not fun, I had work to do and people at work to IM to collaborate with.

I love all of the hard work that the Plasma 5 and KDE devs do.  You guys rock, and my world has been better for it for the last 16 years of using KDE.  Consider this my heartfelt thanks for all of your hard work.  But as with most things that change out from under you, it’s irksome to get a new version and things are broken.  Of course, the first thought it to blame someone for things being broken.  There’s a phrase I keep saying and trying to remember : there’s always extenuating circumstances.  In other words, when criticising other coders make sure you understand all the factors that went into their decision before opening your mouth, otherwise you’ll only embarrass yourself.  That is definitely true here, as demonstrated in the following two article links.  It looks as if they’re attempting to correct hackish behavior with respect to systray icons, so that we can transition to something like Wayland in the future and get rid of X baggage.  Ah, so there *IS* a reason…

Where are my systray icons?

System Tray in Plasma Next

Footnote:  I rely heavily upon Pidgin, and before you suggest XYZ client because it’s better, we all use software that we’re accustomed to for a reason, and we’re more efficient for it.  Doesn’t mean I’m unwilling to try out new clients but sometimes sticking with what you know when it just works, is worth it.  I like to save my brain power (or brain damage) for the new things I must learn.