I am running the following os image on my pi 3 model b:

Raspbian Buster with desktop and recommended software Image with desktop and recommended software based on Debian Buster Version:September 2019 Release date:2019-09-26 Kernel version:4.19 Size:2541 MB

I am trying to make some modifications to the autostart file to keep the screen from going to sleep by running the command sudo nano ~/.config/lxsession/LXDE/autostar" but there does not exist a folder named lxsession in that directory.

Could it possibly be that there exists an lxsession but it is hidden? Please advise.

enter image description here

  • For the next time, please don't post pictures of text. Instead paste the text direct into the question :-)
    – Ingo
    Nov 25 '19 at 20:17

If you just want to prevent your Pi from going into sleep mode you could just change lightdm which manages sleep mode.

Go into the config file:

sudo nano /etc/lightdm/lightdm.conf

and add the following line:

xserver-command=X -s 0 dpms

Edit: I just noticed you're probably following a guide for the Raspberry Pi 4 where indeed that directory and file exist. But the Pi 3/3b need another approach if you want to get something into auto start.

Regarding your missing directory I think that you are searching for:


and there you need to create a file which does what you need it to do but I only created .desktop files, so I'm not quite sure what type of file you need.(Probably a .desktop file that executes some command)

  • Thank you so much!
    – beloas
    Nov 25 '19 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.