I am currently building a kiosk for a local sports club and I am running into a few issues here and there.
Since multiple pages have to be loaded at the beginning, I opted to use Firefox which will use ubuntu-frame.
You can find the whole configuration and installation guide here: https://gitlab.com/raQai/firefox-kiosk
During testing the
kiosk.service started up fine and I was able to stop/restart it multiple times.
Once I enabled the service and reboot the machine, Firefox no longer opens and I am stuck at the empty
Funny part about this: I can no longer start the service at all and I cannot find any logs which explain this behaviour...
Just learned recently about
ubuntu-frame so this might be complete bs what I am trying to do here. Please help :)
[Unit] Description=Firefox Kiosk After=snap.ubuntu-frame.daemon.service After=getty.target Conflicts=display-manager.service StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 Environment=WAYLAND_DISPLAY=wayland-0 Environment=MOZ_ENABLE_WAYLAND=1 Environment=HOME=/root 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=firefox-esr -P default Nice=15 [Install] WantedBy=graphical.target
systemctl status kiosk ○ kiosk.service - Firefox Kiosk Loaded: loaded (/etc/systemd/system/kiosk.service; disabled; vendor preset: enabled) Active: inactive (dead) Jan 21 15:47:34 rq-ThinkPad-X201 systemd: Started Firefox Kiosk. Jan 21 15:47:35 rq-ThinkPad-X201 firefox-esr: Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm Jan 21 15:47:35 rq-ThinkPad-X201 firefox-esr: Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs Jan 21 15:47:35 rq-ThinkPad-X201 systemd: kiosk.service: Deactivated successfully.
Update 1: By disabling the process, killing all Firefox related processes and running
sudo \ WAYLAND_DISPLAY=wayland-0 \ MOZ_ENABLE_WAYLAND=1 \ HOME=/root XDG_RUNTIME_DIR=/run/user/0 \ XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop \ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus \ firefox-esr -P default
I found out, that Firefox starts with a window saying:
Firefox closed unexpectedly while starting. This might be caused by add-ons or other problems. You can try to resolve the problem by troubleshooting in Safe Mode.
The command exits immediately with
0 which does not match the behavior when starting without the crash dialog. Clicking the
Open button starts Firefox as expected but the command line no longer manages this process.
Regularly closing Firefox and running the command again, I can start Firefox as expected and the process remains in the current shell, no
exit 0 until the window is closed.
I guess the service runs into issues since it constantly restarts due to the
exit 0 behavior.
This happens every time the process is killed, e.g. by using
Ctrl+C if the process was started from the command line. I actually want to be able to kill the process since I want to kill it if no user is interacting with the kiosk. This means I require to be able to ignore this dialog and not terminate with
exit 0 unless the process was actually killed/closed.
disabled. Try re-enabling it.
Active: active (running)followed by
Active: activating (aut-restart)containing this info
Process: 174124 ExecStart=firefox-esr -P default (code=exited, status=0/SUCCESS).