I have cinnamon installed in parallel to XFCE. When I start XFCE I see cinnamon-screensaver running. (on Manjaro Testing) I am not able to prevent that. I have tried multiple things. E.g. - OnlyShowIn=CINNAMON in /usr/share/applications/cinnamon-screensaver.desktop - edit the service file and set Exec=xxx-cinnamon-screensaver so that it does not find the excecutable - and then I found out that it is dbus related. systemctl status --user ... ├─dbus.service │ ├─5552 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only │ ├─5623 /usr/lib/xfce4/xfconf/xfconfd │ ├─5633 cinnamon-screensaver │ ├─6086 /usr/lib/tumbler-1/tumblerd │ ├─6400 /usr/lib/goa-daemon │ └─6422 /usr/lib/goa-identity-service .. You can read that all here in the thread I have created for Manjaro Testing: https://forum.manjaro.org/t/xfce-cinnamon-interference-with-cinnamon-screensaver/100040/9 I then opened an issue for the cinnamon-screensaver. The developers told me that this is an XFCE bug and that XFCE should blacklist the cinnamon-screensaver: https://github.com/linuxmint/cinnamon-screensaver/issues/319
Some user may want to use cinnamon-screensaver with their Xfce session, so simply blacklisting it would be a bad idea.
Blacklisting just means that xfce is not starting it automatically per default via dbus. Why is it doing that anyways? Is it starting all other possible screensavers per default as well? And why is it then not honoring the OnlyShowIn=CINNAMON setting or any other setting in the cinnamon-screensaver.desktop file for that matter? Even if the cinnamon-screensaver is blacklisted in that regard it can still be executed by the user with a start script. The users who want to use is explicitly will not have an issue. And, by the way, the term "blacklisted" was taken from the reply of the cinnamon developer who said: "Please file the issue against XFCE as they will need to add a blacklist to prevent is starting in their session. Cinnamon had to do the same to prevent gnome-screensaver from starting in cinnamon session."
Changes to the file /usr/share/applications/cinnamon-screensaver.desktop only affect the visibility in the application menu. It is not an autostart launcher which is usually placed in /etc/xdg/autostart. Apparently, xfce4-session does a screensaver initialization, see: https://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-systemd.c#n92 https://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfce-screensaver.c#n235 This may be the reason why cinnamon-screensaver (second in the list) is started by xfce4-session via D-Bus activation.
Simon Steinbeiss referenced this bugreport in commit 596df43ffeb7f24d6353e472b25a409b07ce3d68 Try xfce screensaver before cinnamon (Bug #16223) https://git.xfce.org/xfce/xfce4-session/commit?id=596df43ffeb7f24d6353e472b25a409b07ce3d68
Simon Steinbeiss referenced this bugreport in commit 130915588c8be4f887d5b940015b14189f21df41 Try xfce screensaver before cinnamon (Bug #16223) https://git.xfce.org/xfce/xfce4-session/commit?id=130915588c8be4f887d5b940015b14189f21df41
While my patch may not resolve this problem altogether it at least ensure that Xfce's own screensaver is started (instead of Cinnamon's) if installed. So depending on your setup, this may make the problem go away for you.
I will certainly test that when the change hits Manjaro Testing. But I do not get why xfce is concerned about other screensavers anyways. From my point of view xfce should only launch its own screensaver automatically. If xfce-screensaver can not be launched, the session should run without screensaver. If the user wants to use a different screensaver he can still do it by starting it via autostart script. Why is xfce checking on all the other screensavers?
The overall rationale behind the decision to always try to launch *some* screensaver comes from a time where Xfce didn't have its own. The idea was to always try to keep the user save, no matter which screensaver was installed. We could revisit this decision, based on how many distros pick up xfce4-screensaver as default and discuss also promoting it to the core module group. @bluesabre: Thoughts?
I think for now we should consider the original problem fixed. If we want to drop support for other screensavers it doesn't affect only cinnamon but all other screensavers listed there. If we really want to change this kind of behavior which has been established for quite some time already we should have a broader discussion about it.