Score:1

xdotool unable to work after the 22.04.1 LTS update

bd flag

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

Organic Marble avatar
us flag
22.04 uses Wayland by default so x applications don't work. Log out and log into a x session.
Score:3
cn flag

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.)

Fixel avatar
bd flag
thanks ! works fine now after I switch to Xorg
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.