In my shellrc I have a function to activate (focus / bring to the foreground) a window by its title, using the org.gnome.Shell Eval dbus interface. (The xdotool approach doesn’t work under Wayland.) This worked great until GNOME 41 restricted the ability to call Eval. Does anyone have an alternative solution, other than enabling the new “unsafe mode” (which reenables Eval, but is apparently, well, unsafe) or writing a dedicated extension?

2 Answers 2


Since I couldn’t find any existing way of doing this, I eventually wrote my own GNOME Shell extension, Activate Window By Title (source). It exposes a custom D-Bus interface that can be used instead of org.gnome.Shell.Eval, for example:

busctl --user call \
    org.gnome.Shell \
    /de/lucaswerkmeister/ActivateWindowByTitle \
    de.lucaswerkmeister.ActivateWindowByTitle \
    activateBySubstring \
    s 'Firefox'

I found



and this works perfectly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .