2

I have a script that I run on RHEL (currently 8.4, but this has worked on many previous versions). It uses wmctrl -a to activate specific windows. I just created a Fedora 36 VM on VirtualBox and there wmctrl -a does nothing. Likewise wmctrl -l lists nothing. I am using the default window manager which I believe is Gnome 41. Can anyone assist?

2 Answers 2

2

wmctrl is a utility for X.org/X11, you are most likely running a Wayland session.

Unfortunately to the best of my knowledge Wayland doesn't have any alternatives.

Wayland developers are not concerned with anything approaching the usability of X.org.

3
  • 2
    Bingo! Thanks. All I did was reconfigure not to use Wayland.
    – Tom LInk
    Commented Dec 30, 2021 at 22:39
  • @TomLInk Please accept the answer.
    – user598527
    Commented Apr 28, 2022 at 11:00
  • @artem Sorry but it does not allow me.
    – Tom LInk
    Commented Apr 29, 2022 at 13:58
1

As mentioned in another answer, wmctrl doesn't fully work with Wayland. However, there is an alternative way to have hotkeys raise a window (or launch an app) since you're using GNOME:

'Run or raise' GNOME extension

As bonus, it has some additional functionality (that would be more work to accomplish with your own scripts and wmctrl), such as cycling through matching windows upon repeating the hotkey, and bringing the window to your active workspace (it's nice being able to pull the terminal around whenever I want rather than always having it on all workspaces).

You must log in to answer this question.

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