Regular solution
In principle, the solutions above :
- setting desktop-provided power management -- or
xset -dpms ; xset s off
for a one-time test
- disabling/uninstalling desktop-provided screensaver and checking/killing existing one to be sure (like
pgrep screensaver
etc.)
...should be enough.
Don't add acpi=off
to grub for this, it is off-topic here.
Stronger solution
If all else fails, or you just want to do it once without changing all settings back and forth, you can resort to hacks.
For example, you can install xdotool (on Debian or Ubuntu sudo apt-get install xdotool
and you're done). This tool can simulate keypresses that will prevent screensaver and blanking just like normal activity does.
This command line simulates pressing and releasing left shift every 30 seconds:
while sleep 30 ; do xdotool keydown Shift_L keyup Shift_L ; done
I use that from time to time and it works great. It's also efficient at preventing laptop LCD screen backlight from dimming.
(You might want to change the key being simulated if pressing Left-Shift might disturb focused application.)
Warning
Don't let it too long for fear of damaging your screen (most screen technologies, when displaying a constant high-constrast image for a long time, eventually strain screen elements permanently. As a result, on flat-coloured areas a residual positive or negative image appears).
xset
won't help (it controls the 1980s X screensaver, which most recent environments disable to use their own). And you should probably keep ACPI enabled, otherwise you can't control the backlight.