0

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 ubuntu-frame display.

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[1]: Started Firefox Kiosk.
Jan 21 15:47:35 rq-ThinkPad-X201 firefox-esr[2641]: Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Jan 21 15:47:35 rq-ThinkPad-X201 firefox-esr[2641]: Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
Jan 21 15:47:35 rq-ThinkPad-X201 systemd[1]: 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.

Any Ideas?

2
  • Your status output shows kiosk.service as disabled. Try re-enabling it.
    – user535733
    Jan 21, 2023 at 16:07
  • Yea, disabled it due to the autostart. re-enabling results in a loop of Active: active (running) followed by Active: activating (aut-restart) containing this info Process: 174124 ExecStart=firefox-esr -P default (code=exited, status=0/SUCCESS).
    – rqq
    Jan 21, 2023 at 16:49

1 Answer 1

0

Seems like my finding in Update 1 was correct.

It also seems like the error/crash dialog cannot be ignored by any way I have found online (e.g. preferences or MOZ_CRASHREPORTER_DISABLE=1).

To "fix" this issue I introduced a new script which will now clean the whole .mozilla folder and copy expected css files back into place. Paired with ExecStartPre this will basically wipe all data whenever the service restarts and ignore previous sessions completely.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .