This issue was reported against many other DEs (Cinnamon, MATE, i3wm..).
I would recommend to check XDG_CURRENT_DESKTOP, rather than relying on DBUS interfaces which may or many not be there or may be started after deja-dup itself.
Values for this key are KDE, MATE, X-Cinnamon, Cinnamon. If the goal simply is to show no systray in Shell, just check for the GNOME value and show it everywhere else.
This issue was reported against many other DEs (Cinnamon, MATE, i3wm..).
I would recommend to check XDG_CURRENT_ DESKTOP, rather than relying on DBUS interfaces which may or many not be there or may be started after deja-dup itself.
Values for this key are KDE, MATE, X-Cinnamon, Cinnamon. If the goal simply is to show no systray in Shell, just check for the GNOME value and show it everywhere else.
Hope it helps.