While developing a small cross-platform game on C++, I got stuck with following issue: when players are playing with a USB gamepad without touching a keyboard or mouse, the comp
As far as I can tell, things with xdg in the name are the way to go for cross-desktop-environment functionality. There appears to be a commandline utility called xdg-screensaver. It seems to have a bunch of screensavers hardwired and then fall back to xset s off
/xset s default
, so you might want to just call it when it's installed, or fall back to copying part of its logic when it's not...