There are numerous step necessary to make that work.
1/ Test Firefox would start:
In a shell, as root, run (use sudo -i
to become root):
WAYLAND_DISPLAY=wayland-0 MOZ_ENABLE_WAYLAND=1 firefox http://www.askubuntu.com
2/ Automate ubuntu-frame at startup
If you are not on a Ubuntu, you probably need to run this once:
snap set ubuntu-frame daemon=true
You should also remove the mir package (that would otherwise take memory):
snap remove wpe-webkit-mir-kiosk
3/ Automate firefox at startup
You need con configure a systemd service. For that, you need to create a file /etc/systemd/system/firefox-frame.service with this content:
[Unit]
Description=Firefox Display
After=snap.ubuntu-frame.daemon.service
After=getty.target
Conflicts=display-manager.service
[Service]
Type=simple
Environment=HOME=/root
Environment=WAYLAND_DISPLAY=wayland-0
Environment=MOZ_ENABLE_WAYLAND=1
Environment=XDG_RUNTIME_DIR=/run/user/0
Environment=XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
ExecStart=/usr/bin/firefox --kiosk http://www.askubuntu.com
Nice=15
[Install]
WantedBy=default.target
Test this with ("firefox-frame" is the name of your file above)
systemctl daemon-reload
systemctl start firefox-frame
If all is ok, you can enable it definitively with
systemctl enable firefox-frame
PS: I am currently using Debian, with native firefox-esr.