Key-press based activation of wpa_gui and the hard-coded system tray icon

Ondřej Grover ondrej.grover
Tue Jun 16 02:01:29 PDT 2015


Hello,

I really like the wpa_gui interface, I use the
wpa_gui+wpa_supplicant+dhcpcd combo on Debian 8.1 Jessie for a complete and
robust roaming networking setup.
However, I'm having issues with the way the system tray support is
hard-coded.
I have a keyboard shortcut defined in my window manager (i3) that starts
wpa_gui and that works well. But once I close the window it is minimized to
the system tray. I don't mind that, especially since the quiet option has
been introduced.
The problem is that the each time I start wpa_gui via the keyboard shortcut
a new wpa_gui process is started and a new tray icon is created and when
the window is closed, I get another icon in the system tray. As the process
does not check for an already running wpa_gui process (I haven't found
anything like that in  wpa_supplicant/wpa_gui-qt4/wpagui.cpp), many
redundant wpa_gui processes keep running.

So the end goal I want to achieve is to start wpa_gui via a keyboard
shortcut without having many redundant processes running.
I see several ways to achieve this:

1. add an option to wpa_gui that would prevent system tray icon creation. I
could easily create a patch for that, the only important change would be
in  wpa_supplicant/wpa_gui-qt4/wpagui.cpp
-     if (QSystemTrayIcon::isSystemTrayAvailable())
+    if (useSystemTray && QSystemTrayIcon::isSystemTrayAvailable())
and useSystemTray (true by default) could be set to false via e.g. a `-T`
option.

2. assign keyboard bindings for opening some of the windows like the main
window or scan results
Afterwards wpa_gui could be started with -t to keep it in the system tray
and just open the windows when needed
However, that would require a much larger change in the code. The benefit
would be that other windows than just the main one would be quickly
accessible.

Let me know what you think about these proposals.
Thank you very much for your ongoing work on wpa_supplicant, I use it every
day.

Kind regards,
Ond?ej Grover
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150616/3c1aacf4/attachment.htm>



More information about the Hostap mailing list