After a few minutes, the screen turns black and a screensaver will come out if I move the mouse, like on the screenshot below. How to turn all these off? The OS is Centos 7.

After a few minutes, the screen turns black and a screensaver will come out if I move the mouse, like on the screenshot below. How to turn all these off? The OS is Centos 7.

In your terminal write these commands:
xset s off
xset s noblank
EDIT1:
Try with this script:
#!/bin/sh
export DISPLAY=:0.0
xset s off
xset s noblank
xset -dpms
In centos 7, click on your username in the upper right corner. Then click 'Power' and change the time to what you want. There is an option for 'Never' so that your screen will quit going black.