Mission Center is a system monitoring application that allows a user to view system resource utilization, view running applications and processes, as well as view and control system services (SystemD and OpenRC).
In order to provide a good out of the box experinece to my users I would like to enable auto-connection to the following plugs:
hardware-observe
network-manager
network-observe
process-control
system-observe
hardware-observe:
The application monitors devices present on the user’s system, this includes CPU, RAM, storage devices, network devices, GPUs and fans.
network-manager:
The application connects to org.freedesktop.NetworkManager on the system bus to query information about each detected network interface
network-observe:
The application uses the APIs provided by the <net/if.h> header to detect available network interfaces.
process-control:
The application allows a user to not only view running processes but also send a TERM or KILL signal to them
system-observe:
The application allows a user to only view running processes by PID, name, executable, parent, etc.
I’m definitively for granting auto-connection to hardware-observe, network-manager, network-observe and system-observe.
Regarding process-control, it does not feel required for most usecases. I would prefer to go with manual connection. Then, the first time a user tries to kill a process you can detect whether the plug interface is connected and prompt the user to manually connect it if not. Would that work for you?
Finally, I do not think auto-connect of desktop-launch is appropriate - this interface is designed for things like an entire desktop session or an app store that wants to provide the ability to launch other snaps.
@alexmurraynetwork-manager-observe doesn’t seem to be enough, no network interfaces show up.
I need to see what the difference is between network-manager and network-manager-observe.
EDIT: After a bit of debugging this is the log that I see:
Failed to get device info for "enp6s18": GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.244" (uid=1000 pid=13450 comm="/snap/mission-center/x1/usr/bin/missioncenter" label="snap.mission-center.mission-center (enforce)") interface="org.freedesktop.NetworkManager" member="GetDeviceByIpIface" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1516 comm="/usr/sbin/NetworkManager --no-daemon" label="unconfined")
Apparently access to the GetDeviceByIpIface is not allowed when using network-manager-observe, this seems unintentional to me. Any ideas @alexmurray@cav?
Unless I’m missing something it looks completely unintentional to me. GetDeviceByIpIface looks like a good candidate to be part of network-manager-observe.
I think this is how GetDeviceByIpIface is working. But, I am also seeing another error
Failed to connect to the D-Bus session bus, and set up monitoring: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.284" (uid=1000 pid=81578 comm="missioncenter-gatherer" label="snap.mission-center.mission-center (enforce)") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus) (missioncenter-gatherer:81578):
If the current network-manager-observe interface is not able to meet the needs of mission-center, then I think it is fine to consider still using network-manager, even if it provides more than is necessary. In the future, if the required methods etc do get added to the -observe interface in snapd then mission-center could be reworked to use this instead. Out of interest, how does the mission-center behave if the network-manager interface is not connected at all?
+1 from me for auto-connection of hardware-observe, network-observe and system-observe. Note there is prior precedence for auto-connect of process-control for similar process monitoring/interaction snaps (Auto-connection requests for htop) so +1 for auto-connect of process-control too. And finally, +1 for auto-connect of network-manager but I would still be interested to know what the behaviour is when this is not available, since perhaps manual connection may be more appropriate here.