How to determine gnome-terminal window ID in Ubuntu 17.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.