05-03-2021, 03:27 PM
(This post was last modified: 05-07-2021, 03:33 PM by pmartin.
Edit Reason: Add command sudo apt update
)
Try Firefox to solve the Chromium memory bug
Note: this is only a try and is working with one Raspberry Pi 4B whith 2GB of RAM, an Allo Boss DAC Hat, Rotary encoder for volume with button for play/pause (mpc toggle) and a 3,5" HDMI display.
I checked Firefox-esr and this browser is not affected by the memory leak.
I checked for 2 days and still works stable.
Firefox includes a kiosk mode but does not use the whole screen when invoked from .xinitrc, leaving a vertical black border on the right and another one at the bottom of the screen.
When Firefox runs from a window manager it works right in kiosk mode filling all the diaplay. The lightest window manager I know is awesome.
I tested to start localui running awesome. In awesome config I put autostart of Firefox in kiosk mode.
To check firefox with the localui service:
Open a console and install Firefox:
Install the awesome window manager
Modify the .xinitrc to run awesome only
Comment with # chromium command and write as last line:
awesome
Type CTRL+0 enter CTRLX to save and close nano editor
Modify /etc/xdg/awesome/awesome/rc.lua to start Firefox with the awesome session
Paste this code at the end of file:
Type CTRL+0 enter CTRLX to save file and close nano editor
Test the new localui with Firefox typing:
sudo systemctl stop localui
sudo systemctl start localui
If Firefox show bookmarks or other tabs, stop localui and Firefox and just delete all files in folder /home/pi/.mozilla
Note: this is only a try and is working with one Raspberry Pi 4B whith 2GB of RAM, an Allo Boss DAC Hat, Rotary encoder for volume with button for play/pause (mpc toggle) and a 3,5" HDMI display.
I checked Firefox-esr and this browser is not affected by the memory leak.
I checked for 2 days and still works stable.
Firefox includes a kiosk mode but does not use the whole screen when invoked from .xinitrc, leaving a vertical black border on the right and another one at the bottom of the screen.
When Firefox runs from a window manager it works right in kiosk mode filling all the diaplay. The lightest window manager I know is awesome.
I tested to start localui running awesome. In awesome config I put autostart of Firefox in kiosk mode.
To check firefox with the localui service:
Open a console and install Firefox:
Code:
sudo apt update
sudo apt-get install firefox-esr
Install the awesome window manager
Code:
sudo apt-get install awesome
Modify the .xinitrc to run awesome only
Code:
sudo nano /home/pi/.xinitrc
Comment with # chromium command and write as last line:
awesome
Type CTRL+0 enter CTRLX to save and close nano editor
Modify /etc/xdg/awesome/awesome/rc.lua to start Firefox with the awesome session
Code:
sudo nano /etc/xdg/awesome/rc.lua
Paste this code at the end of file:
Code:
autorun = true
autorunApps =
{
"/usr/bin/firefox-esr --kiosk --private-window http://localhost",
}
if autorun then
for app = 1, #autorunApps do
awful.util.spawn(autorunApps[app])
end
end
Type CTRL+0 enter CTRLX to save file and close nano editor
Test the new localui with Firefox typing:
sudo systemctl stop localui
sudo systemctl start localui
If Firefox show bookmarks or other tabs, stop localui and Firefox and just delete all files in folder /home/pi/.mozilla