Customizing the right-click menu on the desktop
Updated
You can customize the menu that opens when you right-click the desktop background. You can create custom entries in the menu that run arbitrary commands.
To customize the menu, follow these steps:
-
Log into the standard GNOME session, either Wayland or X11.
-
Install the
gnome-shell-extension-custom-menupackage:# dnf install gnome-shell-extension-custom-menu -
Restart your your desktop session.
-
Enable the
custom-menu-panelGNOME Shell extension.In RHEL 9, you can use the following command:
$ gnome-extensions enable custom-menu-panel@AndreaBenini -
In the
~/.entries.jsonfile, specify your custom menu entries as described in Content from github.com is not included.Gnome Custom Menu Panel.For example:
{ "entries": [ { "type": "launcher", "title": "Desktop Windows", "command": "/usr/bin/xfreerdp +clipboard /v:192.168.0.x /d:DOMAIN /u:USER /p:'PASSWORD' /monitors:1 /f /kbd:0x00020409" }, { "type": "toggler", "title": "Use System Audio", "command_on": "$HOME/bin/audio.switch speaker", "command_off": "$HOME/bin/audio.switch headset", "detector": "$HOME/bin/audio.switch status|grep speaker >/dev/null && echo yes" }, { "type": "separator" }, { "type": "submenu", "title": "Examples", "entries": [ { "type": "launcher", "title": "Desktop Windows", "command": "/usr/bin/xfreerdp +clipboard /v:192.168.0.x /d:DOMAIN /u:USER /p:'PASSWORD' /monitors:1 /f /kbd:0x00020409" }, { "type": "launcher", "title": "RDP Desktop (Generic)", "command": "$HOME/bin/rdp.generic" }, { "type": "launcher", "title": "Apple Keyboard Function Keys fix", "command": "$HOME/bin/keyboard.mac.functionkeys.sh" } ] }, { "type": "launcher", "title": "Stream CAM ", "command": "/usr/bin/ffplay -x 640 -y 360 rtsp://192.168.0.x:5555/MyCamUnicast" }, { "type": "launcher", "title": "Edit Menu", "command": "/usr/bin/gedit $HOME/.entries.json" } ] } -
Restart your desktop session.
-
Right-click on the desktop. Your custom menu opens.
SBR
Product(s)
Category
Article Type