
I have my Pi networked via a switch to my main (Windows) PC. I use WinSCP or my PC for copying files both ways but it means I’m not using the Pi for periods of 15 or 20 minutes.
Unfortunately the default display timeout on the Pi is 10 minutes. It’s not a bad thing but I decided I wanted an hour.
This fix seems to work. It came from this page on the Raspberry Pi forums. To save you the effort of reading through a few different suggestions, the one that worked for me is this in a terminal (From the answer at 1.02 am). The 3600 is the time period in seconds in case you hadn’t guessed!
Apparently there are two timeout mechanism hence two commands are needed.
xset s 3600 xset dpms 3600 3600 3600
You can view the settings with
xset q
However to make these settings permanent, you need to edit the file:
sudo nano /etc/xdg/lxsession/LXDE/autostart
That way they are set at boot time.
Note. I’m not really a fan of nano. From Ubuntu I’ve used gedit quite a bit and it is a visual full-screen editor, not line by line like nano. Yeah you could use VS Code if it were open but then on files where you have to use sudo, it’s easier to use gedit.
So
sudo apt install gedit
will install it. Just gedit or sudo gedit (for those awkward files!)