Raspberry Pi

How to Open Website on the Boot of Raspberry Pi

Opening a Chromium browser on the Raspberry Pi system and loading your favorite website after the device reboots may be a hectic task for most users who use this device solely for internet surfing. To tackle this issue, there needs to be a way that automatically opens the browser on your Raspberry Pi system and loads the website once your device reboots. This is also useful if you use a web-based monitoring app on Raspberry Pi.

This article will show how you can easily perform the process to open the website on startup with a Raspberry Pi. So, let’s take you toward the main process.

Open a Website on Boot of Raspberry Pi

The Raspberry Pi device uses LXDE desktop as its default desktop environment, which proves to be a lightweight and effective environment for low-powered devices like Raspberry Pi. Thus, if you are using the same desktop environment, you can go on and perform the following steps on your system to open a website on startup.

Step 1: Open Hidden Configuration Directory

First, you should need to open the hidden configuration directory in your Raspberry Pi using the following command:

$ cd .config

Step 2: Create Directories Inside the Configuration Directory

Now, within the configuration directory, you must create two more directories “lxsession” and “LXDE-pi” using the following command:

$ sudo mkdir -p lxsession/LXDE-pi

Step 3: Create a File in Configuration Directory

Next, you must create a file “autostart” inside the Configuration directory through your favorite editor using the following command:

$ sudo nano lxsession/LXDE-pi/autostart

Within the file, paste the following few lines codes:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
point-rpi
@chromium-browser --start-fullscreen --start-maximized

Replace the <website-address> with the web address you want to open on reboot.

Save this file using CTRL+X, add Y and press Enter. Reboot your system and once it restarts, you will see a full-screen website on your system screen.

To exit the full screen, you can press the F11 key from your keyboard.

Conclusion

Automating the task of opening a web app at the startup is an effective solution to prevent the hassle of opening a browser and then typing the address. You can do this task on your Raspberry Pi system using the simple steps mentioned in the above guidelines for the LXDE desktop environment. Once you are done with the steps, you can reboot your system and see the website automatically open on your desktop at the startup.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.