How would a system tray application be accomplished on other platforms?

Windows has the "system tray" that houses the clock and alway-running services like MSN, Steam, etc.

I'd like to develop a wxPython tray application but I'm wondering how well this will port to other platforms. What is the tray equivalent on each platform, and how much manual work would be required to support Windows, OSX and Linux (which shells in particular would be friendliest).

Asked by: Alfred780 | Posted: 28-01-2022

Answer 1

wx is a cross-platform GUI and tools library that supports Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more. And if you use it's classes then your application should work on all these platforms. For system tray look at wxTaskBarIcon (

Answered by: Sawyer620 | Posted: 01-03-2022

Answer 2

Under OS X you have the Status Menu bar - the right-most items are often status-related things (like battery status, WiFi connections, etc).

Try searching for NSStatusBar and NSMenuExtra. It's almost trivial to turn an application into one that has an NSStatusBar menu and doesn't appear in the Dock. There are tutorials around on how to do it.

Answered by: Julian588 | Posted: 01-03-2022

Answer 3

For many Linux desktop systems (Gnome, KDE, etc.) a Freedesktop's SysTray Protocol is implemented. You can try that if any other solution fails.

Answered by: Darcy443 | Posted: 01-03-2022

Answer 4

On Linux it really depends - you got diffrent programming environments there, and some window managers don't even have a tray area. Altho, if you use Gtk (and wx is Gtk really), the gtk.StatusIcon is your friend.

Here are some examples of that (haven't checked if they actually work, but should show you the path).

For wx I found some example code here.

Answered by: Kristian644 | Posted: 01-03-2022

Answer 5

Use Qt: Qt Systray Example

That'll show a systray icon on all platforms that Qt runs on and that support such icons. You'll need to come up with a strategy when systray functionality isn't supported, though.

Answered by: Anna890 | Posted: 01-03-2022

Similar questions

Python + ZMQ: Operation cannot be accomplished in current state

I am trying to get a python program to communicate with another python program via zeromq by using the request-reply pattern. The client program should send a request to the server program which replies. I have two servers such that when one server fails the other takes over. Communication works perfect when the first server works, however, when the first server fails and when I make a request to the second server,...

python - 'if' statement only accomplished only once in a loop

I am simulating a cache system by performing a cumulative sum of bytes and, when this sums up to 0.95 the size of the cache, forces the value to be 0.9 of the full size. Final result should evolve as a saw tooth. This is the code I implement to force this condition. cache_size=1e11 #B high_mark=0.95 low_mark=0.50 ordered_datestamp['Cache']=0 for i in range(1,rows_number): ordered_datestamp...

python - Pillow, centering of text not working, how is this accomplished?

I have tested the calculations and the math is correct (and takes into account the height and width of the font), but after Python creates the image and I put it into Photoshop, the vertical and horizontal centering of the text is not correct. Should I be doing something else with my code? from PIL import Image, ImageDraw, ImageFont # base ="Images/Phones/KK17018_Navy_KH10089.jpg").con...

Still can't find your answer? Check out these communities...

PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python