Thanks, I hadn’t seen that page.
Actually, I found out here a solution that works for me:
export YDOTOOL_SOCKET=/tmp/.ydotool_socket
systemctl restart ydotool
sudo chmod 666 /tmp/.ydotool_socket
Now I can run ydotool
without root and it works. Probably not ideal from a security perspective, but at least usable.