I was asked to provide instructions for using the custom-menu-panel extension (https://extensions.gnome.org/extension/4295/custom-menu-panel/) in RHEL8. Here are my findings: The oldest version the extension claims to support is GNOME 40 (RHEL9), but in reality it works as expected on older versions, including RHEL8. By default, gnome-shell does accept extensions that don't explicitly support the GNOME version in use, so the extension should work out of the box. To make sure that is the case, check that $ gsettings get org.gnome.shell disable-extension-version-validation returns "true". If it doesn't, the value can be changed with the following command: $ gsettings set org.gnome.shell disable-extension-version-validation true Alternatively, edit the extension's metadata.json file to include "3.32" in the "shell-version" array. The extension reads its menu definition from a ".entries.json" file in the user's $HOME. The root object should have an "entries" property that contains an array of objects that describe menu items. Each menu item has a "type" property that describes the item type: - launcher A regular, stateless item that runs a command when activated. It is defined by the following properties: - title - the menu item label - command - a shell command line to run if the item is activated - toggler A menu item with an on/off state (represented by a switch) It is defined by the following properties: - title - the menu item label - command_on - a shell command line to switch the item on - command_off - a shell command line to switch the item off - detector - a shell command for determining the initial state According to the documentation, the "detector" command should return 0 for "on" and non-0 for "off". However in reality - the command isn't run at all (unless manually patching the extension) - the state actually depends on whether the command returns any output - submenu An expandable item that reveals additional menu items when activated It is defined by the following properties: - title - the menu item label - entries - an array of menu items, just like the top-level property The format allows for nested submenus, but the implementation does not. - separator A non-interactive item to visually separate menu sections from each other. The following is an example configuration that contains at least one item of each type: ``` { "entries": [ { "type": "submenu", "title": "Clock", "entries": [ { "type": "toggler", "title": "Show Seconds", "command_on": "gsettings set org.gnome.desktop.interface clock-show-seconds true", "command_off": "gsettings set org.gnome.desktop.interface clock-show-seconds false", "detector": "gsettings get org.gnome.desktop.interface clock-show-seconds | grep true" }, { "type": "toggler", "title": "Show Weekday", "command_on": "gsettings set org.gnome.desktop.interface clock-show-weekday true", "command_off": "gsettings set org.gnome.desktop.interface clock-show-weekday false", "detector": "gsettings get org.gnome.desktop.interface clock-show-weekday | grep true" } ] }, { "type": "separator" }, { "type": "launcher", "title": "Edit menu", "command": "gedit $HOME/.entries.json" } ] } ```
I've uploaded a modified version of the extension that - runs the 'detector' script to fetch the initial state - replaces the background menu instead of adding a custom indicator to the top bar It is available at https://fedorapeople.org/~fmuellner/custom-menu-panel@AndreaBenini.shell-extension.zip. Note that the extension only works with gnome-shell's own background menu. That is, it only works in the regular (non-classic) session with the desktop-icons extension disabled.
Thank you very much. I have passed it on to the customer.
Instructions for testing/docs: 1. In a non-classic session using either Wayland or X11, install and enable gnome-shell-extension-custom-menu-3.32.1-33.el8.noarch.rpm 2. Customize a file called .entries.json at $HOME/ as outlined here: https://github.com/andreabenini/gnome-plugin.custom-menu-panel/blob/main/README.md 3. Restart your session. 4. Right-click on the desktop to see your custom menu.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (gnome-shell-extensions bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2840