activate LCD interface on openwb 1.9
Verfasst: Do Sep 21, 2023 8:57 am
1. Disable the mouse cursor on the external touch LCD
2. Prepare rPi kiosk mode.
Install chromium-browser and screensaver
2.1 Enable display power management
Edit the autostart file
Add this to the end of the file:
2.1 We need to configure xscreensaver
We need to configure xscreensaver in otder to close the LCD after a minute, not only blanking (LCD is still running), in order to preserve the life of the LCD.
Option 1
The easyest way to doit is to replace the entire content of the file ~/.xscreensaver
Delete all the content and paste the content of this file (attached).
Option 2 - via VNC or HDMI diplay.
IF you use VNC, you will have a resolution problem with setting Xscrensaver
Add this to your /boot/config.txt at the end
Save with Ctrl+x
** Don't forget to comment/remove those lines after you set up the xscreensaver and reboot.[/colour]
In the linux GUI, go to Start Button - Preferences - Xscreensaver.
Make the same settings as in the attached below pictures.
In Open WB settings, you can activate the LCD and display sleep.
3. Open the chromium browser with a page at the startup
Create chromium_start.sh in /home/pi/
Paste this code:
Make the script executable
4. Activate load on boot for this script
add this line:
Ctrl+x to save
5. Reboot
====
If you want/need to enable disable kiosk mode:
Disable Kiosk mode
Enable kiosk mode
Code: Alles auswählen
sudo sed -i 's/#xserver-command=X/xserver-command=X -nocursor/g' /etc/lightdm/lightdm.conf
Install chromium-browser and screensaver
Code: Alles auswählen
sudo apt install -y chromium-browser xscreensaver
sudo reboot
Edit the autostart file
Code: Alles auswählen
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Code: Alles auswählen
@xset dpms
We need to configure xscreensaver in otder to close the LCD after a minute, not only blanking (LCD is still running), in order to preserve the life of the LCD.
Option 1
The easyest way to doit is to replace the entire content of the file ~/.xscreensaver
Code: Alles auswählen
sudo nano ~/.xscreensaver
Code: Alles auswählen
sudo reboot
IF you use VNC, you will have a resolution problem with setting Xscrensaver
Add this to your /boot/config.txt at the end
Code: Alles auswählen
sudo nano /boot/config.txt
Code: Alles auswählen
#vnc resolution high for Xscreensaver setup
framebuffer_width=1900
framebuffer_height=1080
In the linux GUI, go to Start Button - Preferences - Xscreensaver.
Make the same settings as in the attached below pictures.
In Open WB settings, you can activate the LCD and display sleep.
Code: Alles auswählen
http://openwb.local/openWB/web/settings/misc.php
Create chromium_start.sh in /home/pi/
Code: Alles auswählen
sudo nano /home/pi/chromium_start.sh
Code: Alles auswählen
#!/bin/bash
#sleep 50 seconds, to wait for openWB to start
sleep 50
chromium-browser --noerrdialogs --incognito --disable-pinch --overscroll-history-navigation=0 --kiosk http://localhost/openWB/web/display.php
Code: Alles auswählen
sudo chmod +x /home/pi/chromium_start.sh
Code: Alles auswählen
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Code: Alles auswählen
@/home/pi/chromium_start.sh
5. Reboot
Code: Alles auswählen
sudo reboot
If you want/need to enable disable kiosk mode:
Disable Kiosk mode
Code: Alles auswählen
sudo sed -i 's/@\/home\/pi\/chromium_start.sh/#@\/home\/pi\/chromium_start.sh/g' /etc/xdg/lxsession/LXDE-pi/autostart
sudo reboot
Code: Alles auswählen
sudo sed -i 's/#@\/home\/pi\/chromium_start.sh/@\/home\/pi\/chromium_start.sh/g' /etc/xdg/lxsession/LXDE-pi/autostart
sudo reboot