Install caffeine in Ubuntu

Install caffeine by entering the following commands in the terminal:

sudo apt update
sudo apt install caffeine

Description:

prevent the desktop becoming idle in full-screen mode

Caffeine prevents the desktop from becoming idle when an application is running full-screen. A desktop indicator ‘caffeine-indicator’ supplies a manual toggle, and the command ‘caffeinate’ can be used to prevent idleness for the duration of any command.