Wednesday, August 24, 2016

Raspberry Pi 3 Jessie auto start Chromium

The autostart file for X moved with the release of Jessie.
Wheezy was located at /etc/xdg/lxsession/LXDE-pi/autostart
If using Wheezy, you will want to modify the next line for the correct file location

The file below is the one needing edited in Jessie.

To auto launch Chromium and disable screen blanking, modify the autostart file:
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
Comment out:
#@xscreensaver -no-splash
Insert the following three lines to disable screen blanking & screen savers:
@xset s off
@xset -dpms
@xset noblank
Insert the following two lines to disable error messages and launch Chromium in kiosk mode:
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences
@chromium-browser --noerrdialogs --kiosk http://www.PageTo.Display --incognito
Reboot to test operation:
sudo reboot

6 comments:

  1. Hi Doug,

    I used this code on my Raspberry Pi3 and it works great. One question, how can I easily exit out of full screen?

    Thanks, Stef

    ReplyDelete
  2. Replies
    1. Hi Doug,

      Is there a way of just coming out of full screen and not closing the browser altogether?

      Thanks.

      Delete
    2. I don't know... I have not tried any other commands. There may be a switch that can be used that I am not aware of, but in a quick Internet search I was unable to find a solution.

      Delete
  3. When I VNC it only shows the desktop, not the URL I have in autostart. Any ideas?

    ReplyDelete
  4. I have never experienced the issue you have described. I recommend ensuring you have chromium installed correctly and then verify text above is what you are using in the sartup file.

    Let me know if you get it working. Also, what version RPi are you working with (I have had success on both RPi2 and RPi3) and what OS version did you flash?

    ReplyDelete