Search code examples
x11ubuntu-22.04xdotool

why xdotool getactivewindow results in XGetWindowProperty[_NET_ACTIVE_WINDOW] failed?


Running xdotool getactivewindow in the terminal results in

XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

But I am almost sure that it was working some time ago...

How to solve this issue?

I am using Ubuntu 22.04.1 LTS and xdotool version 3.20160805.1.


Solution

  • For an unknown reason, I was using wayland when this issue happened...

    For another unknown reason, a reboot makes me switch back to X11, and then the issue is finally gone!