Repository navigation
[FEAT] Add option to disable all window control buttons #186
Description
Activity
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
Your
[IMC]sed is exactly right for the openbox side, so most of this is wiring your own sketch into the right files. Two details matter in practice.On openbox,
/etc/xdg/openbox/rc.xmlis not always the file that counts: withHARDEN_OPENBOX=truethe init copies the system rc.xml to/config/.config/openbox/rc.xmland locks it, andopenbox-sessionprefers that user copy. On Wayland the labwc layout token ismax, as your issue text already says, and with hardening on the init has usually strippedclosefrom that line before any custom script sees it, so a literal replacement of the default string quietly misses too.Until something lands in the image, a
/custom-cont-init.dscript covers it per container (it runs after the image's own config init, before the desktop starts):#!/bin/bash # /custom-cont-init.d/90-no-window-buttons (mounted executable) for f in /etc/xdg/openbox/rc.xml /config/.config/openbox/rc.xml; do [ -f "$f" ] && sed -i '/<titleLayout>/s/[IMC]//g' "$f" done if [ -f /config/.config/labwc/rc.xml ]; then # anchor on the tag: the image init may already have stripped "close" sed -i "s|<layout>[^<]*</layout>|<layout>icon:</layout>|" /config/.config/labwc/rc.xml fi
A
DISABLE_WINDOW_BUTTONS=trueinsideinit-selkies-configwould be the same substitutions next to the existingDISABLE_CLOSE_BUTTONblocks. On your second bullet, I would keep it a separate variable rather than folding it intoHARDEN_OPENBOX, since changing what that removes would alter existing deployments that rely on minimize staying available. Happy to send it as a small PR if the maintainers want it.Reacted by AlanDoozThis is in all bases now.
Reacted by AlanDooz
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
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.