# Setup a Raspberry Pi Zero W to run a Web Browser in Kiosk Mode

####  with Dakboard

<div class="_2FCtq-QzlfuN-SwVMUZMM3 _2v9pwVh0VUYrmhoMv1tHPm t3_fgiqn3" data-adclicklocation="title" id="bkmrk-"><div class="y8HYJ-y_lTUHkQIc1mdCq _2INHSNB8V5eaWp4P0rY_mE"><div class="_2SdHzo12ISmrC8H86TgSCp _29WrubtjAcKqzJSPdQqQ4h " style="--posttitletextcolor: #1A1A1B;">  
</div></div><div class="_1hLrLjnE1G_RBCNcN9MVQf">![](https://www.redditstatic.com/desktop2x/img/renderTimingPixel.png)</div></div>[![image.png](https://bst.wkmimnl.de/uploads/images/gallery/2024-11/scaled-1680-/XKXimage.png)](https://bst.wkmimnl.de/uploads/images/gallery/2024-11/XKXimage.png)

<div class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4" data-adclicklocation="media" data-click-id="text" id="bkmrk--0" style="max-width: 800px;"><div class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4" data-adclicklocation="media" data-click-id="text" style="max-width: 800px;"><div class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root"><div class="_2-UiOdhyj4wHBv7Rc2FeDr ">  
</div></div></div></div>Download Raspbian Buster Lite and write it to the SD card

[https://www.raspberrypi.org/downloads/raspbian/](https://www.raspberrypi.org/downloads/raspbian/)

First login

`u:pi`

`p:raspberry`

Configuration

`sudo raspi-config`

<div class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4" data-adclicklocation="media" data-click-id="text" id="bkmrk-change-pi-password-c" style="max-width: 800px;"><div class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4" data-adclicklocation="media" data-click-id="text" style="max-width: 800px;"><div class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root">1. change pi password
2. change hostname
3. set wifi ssid and pass
4. set timezone
5. inferface opt -&gt; SSH enable
6. Boot Options -&gt; Desktop / CLI -&gt; Console Autologin
7. finish -&gt; reboot

</div></div></div>Applying latest versions

`sudo apt-get update && sudo apt-get upgrade -y`

Creating a Minimum X Server Environment for the Chromium Browser

`sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox -y`

`sudo apt-get install --no-install-recommends chromium-browser -y`

Remove Rainbow Screen (OPTIONAL)

`sudo nano /boot/config.txt`

```
# Disable rainbow image at boot

disable_splash=1

```

Create an free account on Dakboard and get your custom board url

[https://www.dakboard.com/](https://www.dakboard.com/)

Configure Openbox.

`sudo nano /etc/xdg/openbox/autostart`

```
# Disable any form of screen saver / screen blanking / power management

xset s off

xset s noblank

xset -dpms

```

```
# Allow quitting the X server with CTRL-ATL-Backspace

setxkbmap -option terminate:ctrl_alt_bksp

```

```
# Start Chromium in kiosk mode

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' 	~/.config/chromium/Default/Preferences

chromium-browser --disable-infobars --noerrdialogs --incognito --check-for-update-interval=1 --simulate-critical-update --kiosk '[https://DAKBOARD-CUSTOM-URL-HERE]'

```

Start X automatically on boot

`sudo nano .profile`

```
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor

```

Vertical screen (OPTIONAL)

`sudo nano /boot/config.txt`

`display_rotate=1`

Refreshes

`sudo apt-get install xdotool -y`

`sudo nano keyF5`

```
export display=:0,0

xdotool keydown F5; xdotool keyup F5 &

exit

```

`sudo chmod +x keyF5`

`sudo chown pi:pi keyF5`

crontab -e

```
#Refesh every 30 min

0 */30 * * * /home/pi/keyF5

#Shutdown at 11PM  (OPTIONAL)

* 23 * * * sudo shutdown -h

```