How-to: Screen saver inhibitor for Firefox flash player container-plugin or whatever...

Use “org.freedesktop.ScreenSaver”, that should work for both KDE and GNOME, and probably other DEs as well.

qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity

Or see here for how to temporary disable/enable it:
http://people.freedesktop.org/~hadess/idle-inhibition-spec/re01.html

I.e. something like

cookie=`qdbus org.freedesktop.ScreenSaver /ScreenSaver Inhibit someId reason`

(where someId should uniquely identify your application, and reason is a string that describes the reason)

Afterwards you can enable it again with:

qdbus org.freedesktop.ScreenSaver /ScreenSaver UnInhibit $cookie