12

In Ubuntu 17.04 I could use wmctrl to switch to a gnome-terminal window with given window ID:

wmctrl -ia $gnome_term_winid

The window ID of a given gnome-terminal could also be displayed from the terminal by typing:

echo $WINDOWID

After upgrading to Ubuntu 17.10, this is no longer the case. First, echo $WINDOWID gives nothing, and also wmctrl -lx does not show any gnome-terminal windows.

Håkon Hægland
  • 3,973
  • 12
  • 46
  • 80

1 Answers1

10

wmctrl doesn't work properly in a Wayland session as controlling windows is against Wayland's security policy.

wmctrl may work with the application windows running under the XWayland compatibility layer (for example Firefox). But gnome-terminal is an official GNOME app which doesn't run under XWayland so it fails.

You may try to switch to an Xorg session as a workaround.

pomsky
  • 68,507
  • 2
    There are some proposed protocols to support it in general way in wayland, but not one is working on it yet. Really is a shame, i can not concidered a wayland protocol ready to go on linux until this problem will not be resolved. A lot of apps are not working because of this. https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland/46557325 – lestcape Jan 07 '18 at 03:04