How To Install Fildem Global Menu And HUD For GNOME Shell On Debian / Ubuntu, Fedora Or Arch Linux / Manjaro

Fildem is a global menu and HUD for GNOME Shell. It was forked from the GNOME HUD project, and then made to also support adding a global menu to GNOME Shell. This article explains how to install this on Debian / Ubuntu, Fedora and Arch Linux / Manjaro.

Using this, the menu that's usually built into the application window is displayed on the top GNOME Shell panel. Thanks to the HUD functionality (which is brought up by using the Alt + Space keyboard shortcut), you can also use this to search through the application menu, very useful for applications with vast menus, like GIMP for example.

The Fildem global menu is set to automatically hide and only become visible on mouse over, but this can be changed, so you can have an always visible global menu if you want. 

This GNOME Shell global menu and HUD implementation is not perfect, and you WILL find bugs. It also doesn't work with every application. However, Fildem is still work in progress, so hopefully it will improve with time.

A few more Fildem GNOME Shell global menu and HUD screenshots:

Fildem HUD GNOME Shell
Fildem HUD (searchable menu) for VLC

Fildem global menu on Manjaro with Audacious (Qt interface)

Fildem global menu on Fedora (Wayland) with LibreOffice

Fildem global menu on Ubuntu 20.10 with VLC

You might also like: How To Cast Your GNOME Shell Desktop To A Chromecast (With Audio, Wayland / X11 Support) Using Cast to TV


Fildem application compatibility


Fildem Global Menu works on both X11 and Wayland. However, on Wayland, you'll need to create a global shortcut in system settings to access the HUD, because it's not possible to create a shortcut from the application. Also, on Wayland, there's an issue with the menu not closing when clicking outside of the menu - you'll need to click the menu item again to close it.

Even though this is made for GNOME Shell, it doesn't actually show a global menu or allow searching the menus for applications that respect the GNOME 3 design guidelines, and use an hamburger menu (like the default GNOME applications). For this to work, the application needs to have a traditional menu displayed under the application title bar. So the global menu and HUD won't work with GNOME applications like Nautilus (Files), Gedit, etc.

So using this, the menu will be shown in the top panel for supported applications, and in the application window (either as a traditional menu - there are still cases where that doesn't work with Fildem -, or as a GNOME hamburger menu). 

But even without a global menu, the application menus don't have a consistent look, so I guess you're not missing much, while the advantage is that you can maximize an application that's supported by Fildem and have the menu on the panel, maximizing the screen real estate which is great for laptops with small screens, as well as searchable menus.

Fildem Global Menu supports:

  • GTK3 (as long as they have a traditional menu), GTK2 and Qt5 applications
  • Flatpak, Snap and AppImage applications, as long as they meet the other criteria (I tested this with Kdenlive in all 3 cases and it worked, Gimp built with GTK3 installed from a flatpak package didn't work for me though)
  • Electron applications
  • LibreOffice, Sublime Text / Merge (with this only working on X11), Jetbrain IDEs (you have to install the plugin JavaFX Runtime for Plugins), etc.

Firefox and Thunderbird are not supported, unless you use the patched firefox-appmenu and thunderbird-appmenu (available for example on AUR for Arch Linux / Manjaro).

You can see a list of applications known to work or not work on the Fildem wiki. Also check out this Fildem bug report which contains reports of applications for which the global menu and HUD don't work.

The wiki list shows Google Chrome as working, but it didn't work for me. Also, on the wiki, it's mentioned that the global menu / HUD doesn't work on Manjaro for Qt5 applications however, it did work for me (tested with Audacious Qt interface and KDiskMark).

You might also like: How To Install Pop Shell Window Tiling Extension On Ubuntu 20.04 Or 20.10, Fedora 32 Or 33, Debian Bullseye Or Sid, And Arch Linux Or Manjaro


How to install Fildem Global Menu and HUD for GNOME Shell


Installing Fildem Global Menu and HUD is not hard, and it doesn't even require building anything from source. However, it's somewhat time consuming because it's a bit like a puzzle at this stage. Also, before trying to install it, make sure you read the complete description on GitHub, as well as the known issues.

The Fildem Global Menu should work with GNOME 3.36, 3.38 and 40. It probably doesn't work on older GNOME versions, so make sure you use one of these two GNOME versions before proceeding. 

That means this should work on Ubuntu 20.04, 20.10 and 21.04, Debian Bullseye and Sid, and Fedora 32, 33 and 34. And obviously on Arch Linux / Manjaro.

Below you'll find instructions for installing Fildem global menu and HUD on Debian / Ubuntu, Fedora and Arch Linux / Manjaro (and any other Linux distribution using GNOME Shell based on these). The instructions work on other Linux distributions as well, but you'll have to figure out the name of the dependencies needed by yourself.

1. Install the required dependencies.

  • Ubuntu / Debian:

sudo apt install bamfdaemon gir1.2-bamf-3 libbamf3-2 libkeybinder-3.0-0 gir1.2-keybinder-3.0 appmenu-gtk2-module appmenu-gtk3-module unity-gtk-module-common python3-pip git

  • Fedora (there are no appmenu-gtk*-module packages on Fedora, so we're going to install the unity-gtk*-module packages instead, I've tried this and it works):

sudo dnf install bamf bamf-daemon keybinder3 unity-gtk2-module unity-gtk3-module appmenu-qt5 appmenu-qt5-profile.d python3-pip git

  • Arch Linux / Manjaro:

sudo pacman -S bamf appmenu-gtk-module libkeybinder3 libdbusmenu-gtk2 libdbusmenu-gtk3 libdbusmenu-qt5 git python-pip

For all these Linux distributions (edit: Arch Linux / Manjaro users can also install fuzzysearch via AUR), you'll also need to install a package via pip:

python3 -m pip install --user fuzzysearch

2. Download the latest Fildem release, install Fildem and the GNOME Shell extension.

Grab the latest Fildem release from here (get the .tar.gz), extract it, then open a terminal, navigate to the folder where you've extracted Fildem (e.g. cd ~/Downloads/Fildem-0.6.6)

sudo python3 setup.py install --optimize=1

cp -r fildemGMenu@gonza.com ~/.local/share/gnome-shell/extensions/

There are also DEB packages available for Debian / Ubuntu, as well pkg.tar.zst (this can be installed on Arch Linux / Manjaro using pacman -U ./python3-fildem-0.6.6-1-x86_64.pkg.tar.zst), however, these packages don't include the GNOME Shell extension, so I prefer to install everything from source, since it's not complicated at all anyway.

3. Load the required GTK modules on login.

To get GTK2 applications to work with Fildem Global Menu (and HUD), open ~/.gtkrc-2.0 with a text editor, for example we'll use Gedit:

gedit ~/.gtkrc-2.0

And in this file, add the following line (yes, you can use appmenu-gtk-module on Fedora, even though we've installed unity-gtk*-module):

gtk-modules="appmenu-gtk-module"

To get GTK3 applications to work with Fildem Global Menu (and HUD), open ~/.config/gtk-3.0/settings.ini with a text editor, for example we'll use Gedit:

gedit ~/.config/gtk-3.0/settings.ini

And in this file, if it's empty, paste:

[Settings]

gtk-modules="appmenu-gtk-module"

If the file is not empty, and it already has a [Settings] section, paste gtk-modules="appmenu-gtk-module" under [Settings].

Note that even if this file doesn't exist, if you run the Gedit commands I mentioned above to open those files, Gedit will create the files when saving.

4. Enable the Fildem GNOME Shell extension.

Open GNOME Tweaks or Extensions apps and enable the "Fildem global menu" extension. Don't restart GNOME Shell yet since you'll need to log out and re-login anyway in the next step.

5. Logout and re-login. Restarting GNOME Shell is not enough since the new GTK modules need to be loaded for this to work.

6. Run Fildem and see if it works properly for you.

Open a terminal and type the following command to run Fildem:

fildem

Now open one of the applications I mentioned above as being supported by Fildem. If you're satisfied with Fildem GNOME Shell global menu and HUD, you can proceed to the 8th step to automatically run it on startup.

[[Edit]] There was a previous step here, for tweaking the Fildem global menu padding to get the menu to work properly. This is no longer needed with the latest Fildem.

7. Add Fildem Global Menu to startup.

If you're satisfied with how Fildem works, you can add it to startup so it starts automatically when you login.

On Ubuntu, open Startup Applications and add a new item with fildem as the startup command.

For Debian, Fedora and Arch Linux / Manjaro, if you don't have a GUI to add new startup commands (Tweaks only supports adding applications, and not commands), you can create a file called fildem.desktop in ~/.config/autostart, e.g. open this file for editing with Gedit:

gedit ~/.config/autostart/fildem.desktop

And add this to the fildem.desktop file:

[Desktop Entry]
Type=Application
Exec=fildem
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Fildem
Name=Fildem
Comment[en_US]=Fildem Global Menu and HUD
Comment=Fildem Global Menu and HUD

8. For Wayland users only: set a global keyboard shortcut to open the Fildem HUD (searchable menu).

If you're using Wayland (for example, Fedora uses Wayland by default), the HUD keyboard shortcut (Alt + Space) won't work out of the box. You'll need to open Settings, click on Keyboard Shortcuts on the left-hand side, then scroll down to the bottom of the Keyboard Shortcuts settings window and click the + button to add a new custom keyboard shortcut.

Use fildem-hud as the shortcut command, and set any shortcut you want for it. You can use Alt + Space like Fildem sets for non-Wayland users, since HUD includes window actions, which this shortcut replaces.

The Fildem developer is actively working on this. In case something doesn't work, check out the Fildem repository page and see if something has changed (and please let me know!). Due to this, Fildem may also break while the developer is working on it.

You might also like: How To Restart GNOME Shell From Command Line Without Closing Any Applications (X11 Only)


How to configure Fildem Global Menu and HUD


Fildem global menu settings

[[Edit]] I have removed the instructions that were previously here, because Fildem has been updated with a settings dialog from here you can change some settings:

  • configure the button padding, which you can tweak if the menu items are not synchronized (e.g. if clicking on the Edit menu item opens the File menu instead)
  • there's an option to only show the menu on mouse over (disable this to have the menu always visible)
  • hide the app label when showing the menu

There's also a fix that you can apply to get Gedit to have a menu (it doesn't by default when using Fildem, or at least that was the case for me).

This can be fixed by copying the Gedit desktop file to ~/.local/share/applications (so it's not overwritten on package upgrades, and it only affects your user), and editing the Exec lines to use env UBUNTU_MENUPROXY=0 before the actual executable. In the same desktop file, you'll also need to change DBusActivatable from true to false. You can do all of this using the following commands:

cp /usr/share/applications/org.gnome.gedit.desktop ~/.local/share/applications/

sed -i 's/^Exec=/Exec=env UBUNTU_MENUPROXY=0 /g' ~/.local/share/applications/org.gnome.gedit.desktop

sed -i 's/DBusActivatable=.*/DBusActivatable=false/' ~/.local/share/applications/org.gnome.gedit.desktop

It's worth noting that this makes Gedit use its default hamburger menu, and not a traditional menu (so it won't show up on the top panel).

In case you're encountering issues with other applications' menus, apply the same work-around.


How to remove Fildem global menu


Remove the Fildem GNOME Shell extension using:

rm -r ~/.local/share/gnome-shell/extensions/fildemGMenu@gonza.com

Remove the Fildem files that were installed on your system (besides the extension):

sudo rm -r /usr/local/bin/{fildem,fildem-hud}
sudo rm /usr/local/lib/python3.9/dist-packages/fildem-0.6.6-py3.9.egg

Remove the fildem autostart file (if you've named the autostart file fildem.desktop):

rm ~/.config/autostart/fildem.desktop

Let's also remove appmenu-gtk-module from ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini by opening these files:

gedit ~/.gtkrc-2.0

gedit ~/.config/gtk-3.0/settings.ini

You'll now need to remove gtk-modules="appmenu-gtk-module" from these 2 files.

If you've used the tweak I mentioned above to fix the Gedit menu, remove the custom Gedit desktop file using:

rm ~/.local/share/applications/org.gnome.gedit.desktop

If you also want to remove the installed dependencies (I'll only list the appmenu packages in the remove commands below, in case the other packages are still needed). Watch the command output to see if it tries to remove something else (something you need), in which case don't remove these packages:

  • Ubuntu / Debian:

sudo apt remove appmenu-gtk2-module appmenu-gtk3-module unity-gtk-module-common

  • Fedora:

sudo dnf remove unity-gtk2-module unity-gtk3-module appmenu-qt5 appmenu-qt5-profile.d

  • Arch Linux / Manjaro:

sudo pacman -Rs appmenu-gtk-module libdbusmenu-gtk2 libdbusmenu-gtk3 libdbusmenu-qt5