Files
ansible/roles/pi_kiosk/templates/openbox-menu.xml.j2
Martin Bauer a2ed74093a Give the kiosk a window manager, and a debug mode to go with it
The role ran no window manager on the theory that Firefox is the only X client and
--kiosk makes it full-screen by itself. It doesn't: --kiosk *asks* to be full-screen
over EWMH, and with no WM running nobody answers. Firefox kept its default window
size in the top-left corner - on musicdolphin's 1920x1080 monitor, a 1280x972 window
with black bands down the right edge and along the bottom, which looks exactly like
an overscan problem and isn't one. Openbox answers the request and does nothing else.

pi_kiosk_mode=debug then turns the attached screen into something workable: Firefox
as an ordinary window that is not relaunched when you close it, a visible pointer,
Openbox as the session leader with a root menu offering a terminal, and xterm,
x11-utils and mesa-utils installed. musicdolphin is set to debug for now.

The templates notify the getty handler, so a mode switch restarts the session on its
own - Xorg lives in that unit's cgroup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 13:03:14 +02:00

33 lines
1.1 KiB
Django/Jinja

<?xml version="1.0" encoding="UTF-8"?>
<!--
Managed by ansible (pi_kiosk role). Replaces Debian's default Openbox menu, which
points at a desktop's worth of applications that are not installed here. Right-click
the desktop to open it; in kiosk mode there is no pointer to do that with, which is
the point.
-->
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="{{ inventory_hostname }}">
<item label="Terminal">
<action name="Execute"><command>x-terminal-emulator</command></action>
</item>
<separator/>
<item label="Open the MusicMouse page">
<action name="Execute">
<command>firefox {{ pi_kiosk_url }}</command>
</action>
</item>
<item label="Open it full-screen (kiosk)">
<action name="Execute">
<command>firefox --kiosk {{ pi_kiosk_url }}</command>
</action>
</item>
<separator/>
<item label="Restart Openbox">
<action name="Restart"/>
</item>
<item label="End this X session (it restarts)">
<action name="Exit"/>
</item>
</menu>
</openbox_menu>