- name: nwd-agent
- description: Sends IP address, hostname and screenshot of Ubuntu Core devices to server, every X seconds. Requires my custom WordPress plugin installed on a server that is accessible to the device installing this snap on. Uses ubuntuframe.screenshot for taking the screenshot and requires the --devmode flag to work properly.
- snapcraft: https://github.com/nwdigital/nwd-agent/blob/main/snap/snapcraft.yaml
- upstream: https://github.com/nwdigital/nwd-agent/
- upstream-relation: I am the developer and maintainer of this repository
- supported-category: tools for local ?
- reasoning: the snap is used as a monitoring tool for embedded ubuntu core devices on our network, it needs to take a screenshot and send it to a server I have built for monitoring devices for sanity reasons. The screenshot feature uses ubuntu-frame.screenshot and imagick to resize screenshots since ubuntu-frame.screenshot does not respect portrait layout. Without classic confinement or devmode flag, the screenshot service fails so I need classic confinement for this snap. This will help with updating the app on our devices too since I have to manually update each device using the snap in --devmode. As far as I know, there are no interfaces that would allow me to take screenshots without using devmode or classic confinement. Additionally, this snap in Unlisted in the snap store.
Here is a log when the snap is running successfully in --devmode:
2025-07-10T08:30:27-05:00 nwd-agent.nwd-agent[581340]: Running NWD-AGENT in default OS mode.
2025-07-10T08:30:27-05:00 nwd-agent.nwd-agent[581340]: /root/snap/ubuntu-frame/common/frame_2025-07-10T08:30-05:00.png
2025-07-10T08:30:28-05:00 nwd-agent.nwd-agent[581668]: % Total % Received % Xferd Average Speed Time Time Time Current
2025-07-10T08:30:28-05:00 nwd-agent.nwd-agent[581668]: Dload Upload Total Spent Left Speed
100 191k 100 278 100 191k 402 277k --:--:-- --:--:-- --:--:-- 277k
Here is a log when the snap is running in strict mode without the --devmode flag
2025-07-10T08:32:52-05:00 systemd[1]: snap.nwd-agent.nwd-agent.service: Scheduled restart job, restart counter is at 7.
2025-07-10T08:32:52-05:00 systemd[1]: Started snap.nwd-agent.nwd-agent.service - Service for snap application nwd-agent.nwd-agent.
2025-07-10T08:32:52-05:00 nwd-agent.nwd-agent[584687]: Running NWD-AGENT in default OS mode.
2025-07-10T08:32:52-05:00 nwd-agent.nwd-agent[584736]: /snap/nwd-agent/10/bin/nwd-agent.sh: line 12: /usr/bin/snap: Permission denied
2025-07-10T08:32:52-05:00 systemd[1]: snap.nwd-agent.nwd-agent.service: Main process exited, code=exited, status=126/n/a
2025-07-10T08:32:52-05:00 systemd[1]: snap.nwd-agent.nwd-agent.service: Failed with result 'exit-code'.
I understand that strict confinement is generally preferred over classic.
I’ve tried the existing interfaces to make the snap to work under strict confinement.