hi there… it seems that I’m not able to access dbus using snap.
I should be able to read the org.gnome.SettingsDaemon.Color NightLightActive
properties to understand if the user is running night light or not.
my code works on native app and on flatpak but not on snap.
I get this error when I try to read that dbus properties:
[Instance #1] 09:28:24.519 [pool-21-thread-1] ERROR org.dpsoftware.NativeExecutor - An AppArmor policy prevents this sender from sending this message to this recipient;
type=“method_call”, sender=“:1.696” (uid=1000 pid=211607 comm=“/snap/fireflyluciferin/x1/bin/FireflyLuciferin” label=“snap.fireflyluciferin.fireflyluciferin (enforce)”) interface=“org.freedesktop.DBus.Properties” member=“Get” error name=“(unset)” requested_reply=“0” destination=“org.gnome.SettingsDaemon.Color” (uid=1000 pid=40480 comm=“/usr/libexec/gsd-color” label=“unconfined”)
AFAICT none at this time. Snapd interfaces need to be updated to make it possible.
Since nobody has asked for this particular DBus access rule before, I would suggest to try installing in --devmode first. Collect all denials and post them here. Only then we’ll see which ones need to be added to snapd.
hi thanks @mborzecki1 for the answer, I appreciate it.
to read the night light status on the host I would need this paths:
this is for gnome: org.gnome.SettingsDaemon.Color
and this for KDE: org.kde.KWin.NightLight
What do you mean for collect all denials?
If I install it in devmode it works with no denials.
When using KDE, night light settings can be read on a different dbus path, this one: org.kde.KWin.NightLight
but weirdly that path works without any app armour error.
I don’t know if it can help, but this is my current snapcraft.yaml
please let me know if you need other infos.
if not, what are the next steps? can you “open this plug” in snap? how long it will take? a week? 6 months? two years?
thanks!
No, not yet, I’m neck deep in other things right now. Though, I agree with @soumyaDghosh that it’s probably best to tweak the desktop interface. If any of you want to give it a go, I’ll happily review the PR to snapd.
Hii, Sorry but no. I am not a Canonical employee. And also I am having some of own problems to deal with for some days. You might skip the snap for some days.