DevOps & Cloud Solutions, Managed Services, Uncategorized

Raspberry Pi config to open a web page with hidden cursor on boot

What is Raspberry?

A small and affordable computer that you can use. It is generally used as a computing device for IOT projects.

How to start Chromium on Raspberry boot?

Before knowing the procedure let us first see the use cases.

  1. End User wants a kiosk page to appear on boot rather than manually .
  2. During abrupt reboots(during power offs) this procedure will reduce the manual work

 

Now the only thing needed for the chromium browser to open on boot is to add the following line to the /home/pi/.config/lxsession/LXDE-pi/autostart  file.

The command and the line to be added are as follows:

  • sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
  • @xset s off
    @xset -dpms
    @xset s noblank
    @chromium-browser –kiosk https://domain.com
  • Next Press CTRL+X and type Y for saving the file.
  • sudo reboot

 

You will see that the pi boots up and the chromium opens up in full page mode with the given address

The below video will show you how it pens a page(here www.google.com)

http://bit.ly/2Xobss7

Now every kiosk has  a certain way of showing their websites. For Example some restaurants want to show their menu card on a TV which is vertically placed the he will have a problem as the website will not be fully visible.

So in order to change the orientation by which the raspberry boots we have to change the value of a certain variable. That variable is display_rotate

So lets see what the value does to the orientation.

  • display_rotate=0 : The normal orientation in which the pi boots up

 

  • display_rotate=1 : This value will change the orientation to 90 degrees

 

  • display_rotate=2: This value will change the orientation to 180 degrees

 

  • display_rotate=3 : This value will change the orientation to 270 degrees.

Now we also need to hide the cursor which can be done by the following method:

 

  • sudo apt-get install unclutter
  • nano /home/pi/.config/lxsession/LXDE-pi/autostart
  • add the line “@unclutter -idle 0”
  • reboot the system.

 

 

 

 

About The Author