Hi! The latest releases of htop (3.0.3+) added support for temperature sensors and battery status; but it doesn’t work out of the box due to confinement. Instead, it shows N/A with a warning message: Error: File /etc/sensors3.conf: Permission denied.
No, it still needs read access to various entries under /sys/devices. Adding system-files with read: [/etc/sensors3.conf] and manually connecting still shows N/A in cpu temperature and battery status, with a pretty generic warning message Error: Permission denied, and lots of apparmor denials such as:
+1 to auto-connect hardware-observe. There was some talk of creating a hwmon-control interface that could have a companion observe interface, but it isn’t ready yet. At this time, IME hardware-observe is the correct path forward.
Since hardware-observe is required to support the new added temperature sensors , +1 from me for auto-connect of hardware-observe for htop. +2 votes for, 0 votes against, granting auto-connect of hardware-observe to htop. This is now live.
We should keep on eye on the potential new hwmon-control interface and its companion -observe one, and revisit this declaration accordingly to make sure htop keeps having the least privileges required.