I've already posted this to the Super User exchange, but was told I may find an answer faster here.
I'm attempting to add a feature to an application to keep the screen awake while the user is logged in. The reason for this is that I recently implemented touchscreen functionality to allow the user to control the UI through a touchscreen. However, because we have an out-of-date Linux kernel, we have limited touchscreen functionality -- meaning that although the kernel has multitouch events defined, Xorg doesn't respond to touch at all. So I wrote a driver in the background of our Qt4 application to read touch events directly from /dev/input and to generate mouse events in the application.
However, because these mouse events are not on a system-level and are contained within the Qt application, they do not keep the screen awake or wake it once the screensaver starts. The goal of the touchscreen is to remove the need of the keyboard and mouse for the user on our product, and not being able to wake the screensaver would kind of make it difficult to use it.
The application already has a QTimer setup that fires every 60 seconds (in case some system process changes these settings while the application is being run) to "prevent the screensaver", but after looking at the command it was issuing, it's obvious why it doesn't work, because the command it's using is:
xset s on
So I changed the timer to instead issue the following commands:
xset s off xset s noblank xset -dpms
I also tried executing this command to attempt to prevent xdg-screensaver from launching:
xwininfo -name "plasma-desktop" | grep "plasma" | cut -d' ' -f4 | xdg-screensaver suspend
However, even with these changes, the screensaver eventually appears.
Are there other settings I need to disable to prevent this? Assuming the screensaver that's appearing is the result of the OS launching xdg-screensaver, is there a way I could prevent the launching of that application while our application is logged in? Or is there some other way I should go about this?
If it matters, we are running Scientific Linux 6.4 (kernel 2.6.32-754).
EDIT: Forgot to mention, the desktop environment is KDE4.
EDIT: I found a KSS file matching the screensaver that shows up. I tried renaming it, but that just resulting in a blank screensaver showing up in its place. I need to know how to disable the service that is launching it.