This commit introduces the _kiosk.service_ unit, which launches `sway` to start a Wayland session, which in turn launches Firefox. The `policies.json` file configures Firefox in a sort of kiosk mode, disabling most features and blocking all but the desginated sites. Unfortunately, running `firefox --kiosk` doesn't actually work: Firefox apparently runs, but doesn't draw anything on the screen. Note that we have to launch Firefox by its "real" path, since `/usr/bin/firefox` is a Bash script, and Bash is not installed. Fortunately, the wrapper script doesn't do anything we really care about, so bypassing it is fine.
32 lines
686 B
Desktop File
32 lines
686 B
Desktop File
[Unit]
|
|
After=systemd-user-sessions.service plymouth-quit-wait.service
|
|
Before=graphical.target
|
|
ConditionPathExists=/dev/tty1
|
|
Wants=dbus.socket systemd-logind.service
|
|
After=dbus.socket systemd-logind.service
|
|
Conflicts=getty@tty1.service
|
|
After=getty@tty1.service
|
|
Wants=time-sync.target
|
|
After=time-sync.target
|
|
|
|
[Service]
|
|
StateDirectory=%N
|
|
CacheDirectory=%N
|
|
Environment=XDG_CACHE_HOME=%C/%N
|
|
ExecStart=/usr/bin/sway -c /etc/sway/kiosk.conf
|
|
User=kiosk
|
|
StandardInput=tty
|
|
StandardOutput=tty
|
|
StandardError=journal
|
|
TTYPath=/dev/tty1
|
|
TTYReset=yes
|
|
TTYVHangup=yes
|
|
TTYVTDisallocate=yes
|
|
PAMName=kiosk
|
|
UtmpMode=user
|
|
UtmpIdentifier=tty1
|
|
|
|
[Install]
|
|
WantedBy=graphical.target
|
|
Alias=display-manager.service
|