my xdotool stopped working with the 22.04.1 LTS update . . . anyone else facing the same issue ? Here's my command: xdotool key F11 xdotool key alt + Tab and many other command that uses xdotool

it worked fine before the update and now all my scripts stopped working

  • 1
    22.04 uses Wayland by default so x applications don't work. Log out and log into a x session. Nov 7, 2022 at 15:53

1 Answer 1


xdotool works with Xorg only. There is an alternate tool, ydotool that works at a lower level and thus functions in both Xorg an Wayland. ydotool does not have the window manipulation options that xdotool has, but supports simulating keyboard and mouse actions.

You can move to an Xorg session to continue working with xdotool. If you prefer to stay on Wayland, you may want to move to ydotool to preserve the functionality.

ydotool is available in the repositories of Ubuntu. However, even on 22.20, an old version is shipped that, for me, did not work. I therefore compiled it from source, and that is actually not so difficult. I documented the procedure on Ubuntu 22.04 here on the site.

Note that the new version is a very slimmed down version, reduced to core functionality. The new version also requires the daemon to be running. A drawback of the new version is that symbolic key presses do not work: you explicitly have to "press" and "release" keys yourself using numerical codes. As such, simulating Alt+Tab in ydotool translates to:

ydotool key 56:1 15:1 15:0 56:0

(We press Alt, then Tab, then release Tab and Alt.)

  • thanks ! works fine now after I switch to Xorg
    – Fixel
    Nov 8, 2022 at 7:30

You must log in to answer this question.

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