Is this a new feature request?
Wanted change
Add an option to disable all window control buttons (minimize/iconify, maximize/restore, and close), rather than only the close button.
Currently HARDEN_OPENBOX=true sets DISABLE_CLOSE_BUTTON=true, which removes only the close button.
It would be useful to have these two:
- add a new environment variable such as
DISABLE_WINDOW_BUTTONS=true, which removes minimize, maximize/restore, and close;
- extend the existing hardening behavior so
HARDEN_OPENBOX=true removes all three window control buttons.
Ideally this should behave consistently on both Openbox/Xorg and labwc/Wayland.
Reason for change
When using Selkies containers as a locked-down application interface, removing only the close button still allows users to minimize or change the maximized state of the application.
For hardened/single-application deployments, users should not be able to manipulate the application window through any of the standard title-bar controls.
Removing all three controls would make HARDEN_OPENBOX more complete and would prevent users from minimizing, restoring/unmaximizing, or closing the application from the title bar while still keeping the window decoration/title bar itself.
Proposed code change
A possible implementation would be to introduce DISABLE_WINDOW_BUTTONS.
For Openbox, the current close-button handling:
if [[ "${DISABLE_CLOSE_BUTTON,,}" == "true" ]]; then
echo "[ls.io-init] Disabling close button"
sed -i '/<titleLayout>/s/C//' "$SYS_RC_XML"
fi
could be extended with something like:
if [[ "${DISABLE_WINDOW_BUTTONS,,}" == "true" ]]; then
echo "[ls.io-init] Disabling window buttons"
sed -i '/<titleLayout>/s/[IMC]//g' "$SYS_RC_XML"
fi
where I, M, and C correspond to iconify/minimize, maximize, and close.
For labwc/Wayland, the default titlebar layout is:
<layout>icon:iconify,max,close</layout>
so the same option could remove iconify, max, and close, while retaining the application icon/titlebar.
HARDEN_OPENBOX=true could then set:
export DISABLE_WINDOW_BUTTONS="true"
instead of, or in addition to, DISABLE_CLOSE_BUTTON="true".
Keeping DISABLE_CLOSE_BUTTON separately may be preferable for backwards compatibility and for users who only want to hide Close.
Is this a new feature request?
Wanted change
Add an option to disable all window control buttons (minimize/iconify, maximize/restore, and close), rather than only the close button.
Currently
HARDEN_OPENBOX=truesetsDISABLE_CLOSE_BUTTON=true, which removes only the close button.It would be useful to have these two:
DISABLE_WINDOW_BUTTONS=true, which removes minimize, maximize/restore, and close;HARDEN_OPENBOX=trueremoves all three window control buttons.Ideally this should behave consistently on both Openbox/Xorg and labwc/Wayland.
Reason for change
When using Selkies containers as a locked-down application interface, removing only the close button still allows users to minimize or change the maximized state of the application.
For hardened/single-application deployments, users should not be able to manipulate the application window through any of the standard title-bar controls.
Removing all three controls would make
HARDEN_OPENBOXmore complete and would prevent users from minimizing, restoring/unmaximizing, or closing the application from the title bar while still keeping the window decoration/title bar itself.Proposed code change
A possible implementation would be to introduce
DISABLE_WINDOW_BUTTONS.For Openbox, the current close-button handling:
could be extended with something like:
where
I,M, andCcorrespond to iconify/minimize, maximize, and close.For labwc/Wayland, the default titlebar layout is:
so the same option could remove
iconify,max, andclose, while retaining the application icon/titlebar.HARDEN_OPENBOX=truecould then set:instead of, or in addition to,
DISABLE_CLOSE_BUTTON="true".Keeping
DISABLE_CLOSE_BUTTONseparately may be preferable for backwards compatibility and for users who only want to hide Close.