andrew-bibb / cmst

QT GUI for Connman
174 stars 38 forks source link

Message at startup "unable to find systemtray" Arch Linux #207

Open gearhead opened 4 years ago

gearhead commented 4 years ago

I've been using connman/iwd on a RPI and recently updated my laptop to Arch Linux. I followed the information here to remove NetworkManager and install cmst: https://forum.manjaro.org/t/replace-network-manager-with-connman/99259 I was able to get it all up and it works, but there seems to be some problem at startup as I get the CMST Warning "Unable to find a systemtray on this machine". This is Arch Linux, Fully up to date running Gnome 3.36.0. No custom libraries or files. Is there a missing dbus file or something?

gearhead commented 4 years ago

Doing a bit of searching, I also tried #cmst -w 5 and 10 and get the same result, it just waits the delay time then pops up the message. I did check to make sure that the dbus files were installed when the app was installed and they appear to be there, It would be nice if the systemtray icon was there...

agaida commented 4 years ago

arch is a bit different - so make sure that the trayis up and running - and the second thing is that dbus should be up and running - i guess you know how to debug this

andrew-bibb commented 4 years ago

That message appears when the call to QSystemTrayIcon::isSystemTrayAvailable() returns false. Since you used the wait switches it sounds to me as if QT cannot find your Gnome system tray. The call is a static function in the QSystemTrayIcon class so I don't think you are missing any libraries or files. Have you been able to find anything online about this with other QT applications? I'll try to look around also.

This is not a fix but to quiet the popup you can start the program with the -d switch or disable the tray icon in the Preferences tab.

gearhead commented 4 years ago

With the comments here, I think I see what is going on. Gnome removed the systemtray with 3.26 or something like that. Is there a gnome extension to use this instead of Network Manager in Gnome? Any other possibility to get it in the title bar in later Gnome versions?

andrew-bibb commented 4 years ago

Enlightenment dropped the system tray a while back. There were people then using stalonetray to get that functionality back, and it worked with CMST. As far as getting it in a title bar, I seriously doubt it. I don't use Gnome, is that where they now place programs that used to live in the system tray? If it is then maybe, but it will rely on QT supporting that feature.

progandy commented 4 years ago

As far as i know, gnome dropped all external status icons and only allows shell extensions to add information there. There is an extension to restore the tray, at least the modern SNI/AppIndicator protocol, which is used by QSystemTrayIcon as well. https://extensions.gnome.org/extension/615/appindicator-support/

Or maybe https://extensions.gnome.org/extension/1503/tray-icons/

gearhead commented 4 years ago

I will try this tonight when I get back to it. It may be helpful to get a gnome extension spun up for this project. I have no idea how to do that, but I perceive some turf wars with NetworkManager and Connman/Iwd and possibly some hostility and resistance to using this. My stance is that this is a technology discussion and I prefer Connman/IWD and I guess others do as well and Gnome is a popular WM. It'd be nice to have cmst a bit more integrated in the UI...

andrew-bibb commented 4 years ago

I am not sure CMST could be ported at all, unless of course the QT people decide to support the Gnome way of doing things. I did see one bug report on a QT developer forum and the answer seemed to be they broke it, they can fix it. This program is very tightly integrated into QT. Everything from the user interface (which could probably be ported) to all of the DBUS communication handling (which I am less confident on)

progandy commented 4 years ago

if you want tight integration with the gnome shell, then you'll have to rewrite CMST from scratch as a gnome extension (in javascript). CMST is a GUI that talks to the connman dameon/service, so if you replace the GUI with a gnome extension, then there is no place for CMST anymore in your setup.

Edit: Well, you could create a minimal extension that displays basic information includes an authentication agent and maybe some simple on/off toggles and starts CMST. Maybe you could also allow CMST to act as the authentication agent, but that will run counter to your effort to make it look at home in gnome.

I'd suggest you start with an existing extension, though. Fix it, and add all missing features while following the gnome design guidelines. https://github.com/jgke/gnome-extension-connman