Comment 1 for bug 1595813

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: Snapped app cannot launch external processes

Thank you for reporting a bug. The fact that devmode is not working indicates something unrelated to interfaces is not quite working with your snap.

To be clear though, snaps can launch external processes and grep, awk and bash are all allowed in the default policy (upower is not and needs research) but the files they operate on may not be allowed by the security policy. I looked at the source code and see that:
* /proc/stat is currently not allowed. I'll add this to the system-observe interface
* the upower command is not available in the os snap, so your commands cannot succeed

I suspect it is this last point that is blocking you. If you included 'upower' in your stage packages, I suspect this would start to work in devmode.

For strict mode, upowerd is a DBus service that exists on classic systems but not native systems. To allow access to upowerd we'd need to create a new interface.

Based on the above, I'm going to change the title of this bug accordingly.

Note to snappy interfaces team: perhaps upower-observe and upower-control? I've not examined the DBus API to see if this is feasible, but I suspect it is so long as upower-observe can use DBus Get and upower-control can use DBus Set methods.