Following How to use dbus-run-session on ubuntu core dbus-run-session should be working. Unfortunately it seems to me that something is missing here at least on core18 to actually have it work with confinement.
Failed to open connection to "session" message bus: Failed to determine seats of user "1000": Permission denied
Which seems to be caused from not being able to talk to logind despite being able to access the seats
directory.
@jdstrand am I doing it wrong or is this indeed a bug?
I feel like I should perhaps also point out that without unity7 and desktop-legacy this actually works even less dbus-daemon[21857]: Failed to start message bus: Failed to bind socket "snap.sitter-dbus-session-test./dbus-0T5FytBxiy": Operation not permitted. I suppose that is somewhat expected?
Only the open call on /run/systemd/users/1000 should be the cause of the problem.
The first call is something Jamie already noticed when originally implementing support. The second call is simply trying to find services in the standard service dir (which is one of many possible locations).
I apologize for the delay (just saw this now). I don’t have anything to report at this time but have added this to the list of things to investigate with 2.40 policy updates.
The last one doesn’t give away anything more (that is meaningful) than what is in /etc/passwd, which is already allowed, so that will go to the default template. I’ll think about the other two.