There are a number of resources on the Web for this, but most are outdated or take the process further than I wanted. To be clear, I don’t want to disable the Pi’s desktop or block the user from using Chrome. I just want the Pi to default to opening Chrome, full screen, to a specified Website URL.
Starting with a Raspberry Pi loaded with Raspbian as is the recommended configuration. You must be connected to the network/internet and I usually turn on SSH and VNC so I can control the device remotely. (You can enable these by clicking Menu > Preferences > Raspberry Pi Configuration > Interfaces)
Now that that is established here is what you need to do to get Chromium to open full screen to a Website of your choice. Open Terminal and type the following.
cd .config
That brings you into the hidden .config directory in the pi users home directory.
sudo mkdir -p lxsession/LXDE-pi
Sudo might not be needed here but this command creates the
sudo nano lxsession/LXDE-pi/autostart
This command opens the nano text editor with a file named autostart that we will save after typing or pasting the following content.
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
point-rpi
@chromium-browser --start-fullscreen --start-maximized https://google.com/
Change the Website URL to whatever you like.
If you don’t already know click Ctrl+X to exit the editor. You will be asked to save. Type Y and then just accept the autostart file name by clicking enter.
The above code still works as of 12/5/2021 as I just set up the same item on a new Pi 4. Robert is correct that the URL must be on the same line.
Use this to edit the file after following the instructions by Brian Haines,
sudo nano .config/lxsession/LXDE-pi/autostart
And use these commands,
@lxpanel –profile LXDE-pi
@pcmanfm –desktop –profile LXDE-pi
#@xscreensaver -no-splash
point-rpi
@chromium-browser –start-fullscreen –start-maximized https://google.com/
Notice the web address is on the same line.
Veryn nice.
It works fine.
Do you have any idea to use that with multi tab on chrome ?
Brain,
when i follow all the steps above it will open the chromiom browser in full screen,
but it will not open https://google.com.
should i do also something else?
Had this working for some time, made a couple of changes. I used firefox-esr because it has autoplay, and I needed ‘-url ‘ before the https. I added a sleep button to powerdown the pi before unplugging the power lead. This causes firefox to crash & requires manual intervention to restore previous session. I can’t find any information that allows me to gracefully close firefox when I press the sleep button to powerdown the pi.
Is there a way to add some script to the lxsession/LXDE-pi/autostart file so that,
on wakeup or reboot, I start firefox – then gracefully close it somehow – then restart firefox at my selected url?