Set 5" Display on Pi-Hole to Show Stats


Would anyone know where to start on setting up my Raspberry Pi running Pi-Hole to automatically boot into a full-screen display of statistics for Pi-Hole? As far as I can tell, my Raspberry Pi 2B+ is running perfectly. It is working as Pi-Hole intended. I have a small 5" display directly connected to it. I would like the device to boot up directly to the admin console. I found instructions for trying to do this with a Midori browser, but the statistics do not load. If I use the Chromium browser manually and choose F11 it loads and works. I would like to automate that. Any help on where to start with that? Thanks!



You should be able to run a cron script that runs at boot and loads the desired configuration.



For Raspbian Bash (no desktop) using the default ‘pi’ account and Pi-hole chronometer (pihole -c):

sudo sed -i 's/$/ vt.global_cursor_default=0/' /boot/cmdline.txt

sudo sed -i 's/$/ consoleblank=0/' /boot/cmdline.txt

grep 'autologin' /etc/systemd/system/autologin@.service

sudo systemctl disable getty@tty1.service

sudo systemctl enable autologin@tty1.service

Edit file ~/.bashrc and add below at the bottom:

# Start Pi-hole chrono when on tty1
case $(tty) in /dev/tty1)
  msg="Starting Pi-hole chronometer ... "
  tput cup $row $col
  echo -n "$msg"
  let l=l+col
  for i in {3..1}
    tput cup $row $l
    echo -n "$i"
    sleep 1
  pihole -c
  exit 0

And reboot to apply:

sudo reboot

EDIT: Sorry had to edit few times :wink:

1 Like


Awesome! I had originally wanted the graphical admin console, but this works great. Thanks again.

1 Like


If you are looking for a graphical solution, I simply created the necessary folders for this and then built a document.

  • sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

In the document, add these lines:
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://192.168.x.x/admin/

Where the ip address is that of your pi-hole! Works perfectly on that 5" device.

1 Like