Need help getting ydotool/ydotoold to run under Wayland Ubuntu 24.04. Gnome
Dear all
I am still a rookie and need help to get ydotool running. I want to use this with Ubuntu 24.04. (wayland/Gnome). I read several instructions and set up a system service with this configuration:
sudo cat /etc/systemd/system/ydotoold.service
[Unit]
Description=Ydotool Daemon
After=network.target
[Service]
ExecStart=/usr/bin/ydotoold --socket-path=/tmp/.ydotool_socket --socket-own=1000:1000
#Restart=always
User=martin
[Install]
WantedBy=multi-user.target
I reloaded daemons and (re)started the service.
Also I found advice that permissions for the socket under /tmp are important. For this I added a udev rule like this: sudo cat /etc/udev/rules.d/80-uinput.rules
## ydotoold fix
## https://github.com/ReimuNotMoe/ydotool/issues/25#issuecomment-535842993
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
and I did this: sudo usermod -a -G users $USER
Here are some more information: ls -l /dev/uinput /tmp/.ydotool_socket crw-rw---- 1 root input 10, 223 Mai 23 22:16 /dev/uinput srw------- 1 martin martin 0 Mai 24 11:36 /tmp/.ydotool_socket
So, this is for context. When I now try to start ydotool without root permissions, I get this: YDOTOOL_SOCKET="/tmp/.ydotool_socket" ydotool key 125:1 32:1 32:0 125:0; ydotool: notice: ydotoold backend unavailable (may have latency+delay issues)
and as root: sudo YDOTOOL_SOCKET="/tmp/.ydotool_socket" ydotool key 125:1 32:1 32:0 125:0; failed to connect socket `/tmp/.ydotool_socket': Connection refused Please check if ydotoold is running.
But: ps -ax | grep ydo 14252 ? Ss 0:00 /usr/bin/ydotoold --socket-path=/tmp/.ydotool_socket --socket-own=1000:1000 15065 pts/0 S+ 0:00 grep --color=auto ydo
Can you help me? I am kind of at my wits end with this.
Not sure what your issue might be.
I got version 1.0.4 to work on Fedora 41 without any udev hacks. I just systemctl edit --full ydevtool as root to add -o 1000:1000 reflecting my uid/gid, and start the service.
Then in a kde terminal I can do:
$> export YDOTOOL_SOCKET=/tmp/.ydotool_socket
id -u # verify user id
1000
$> ss -l | grep ydotool # verify process holding socket.
u_dgr UNCONN 0 0 /tmp/.ydotool_socket
$> ls -lnh /tmp/.ydotool_socket # verify socket perms
srw-------. 1 1000 1000 0 Jun 1 15:12 /tmp/.ydotool_socket
$> ydotool type -d 500 itjustworks
Not sure what the issue is.
I have Ubuntu 24.04 LTS (Noble Numbat) too and it worked with:
sudo apt install scdoc;
cd ~/Downloads/;
git clone https://github.com/ReimuNotMoe/ydotool.git && {
cd ydotool; mkdir build; cd build && {
cmake .. && make -j `nproc`;
};
};
sudo make install;
systemctl daemon-reload;
systemctl --user enable ydotoold;
systemctl --user start ydotoold.service;
@Mutisk , @MWH-Rookie , @VinSmokeY
ydotool developers should put the final 4 command lines of this into the README.md file to enable more people to understand like they say that the rewritten code will do.
Please read this!
Not sure what the issue is. I have Ubuntu
24.04 LTS (Noble Numbat)too and it worked with:sudo apt install scdoc; cd ~/Downloads/; git clone https://github.com/ReimuNotMoe/ydotool.git && { cd ydotool; mkdir build; cd build && { cmake .. && make -j `nproc`; }; }; sudo make install; systemctl daemon-reload; systemctl --user enable ydotoold; systemctl --user start ydotoold.service;@Mutisk , @MWH-Rookie , @VinSmokeY
ydotooldevelopers should put the final 4 command lines of this into the README.md file to enable more people to understand like they say that the rewritten code will do.Please read this!
I tried your approach on a fresh, updated ubuntu 24.04:
...all your instructions...
tone@tonestux ~/d/y/build (master)> systemctl --user start ydotoold
tone@tonestux ~/d/y/build (master)> ydotool
Usage: ydotool <cmd> <args>
Available commands:
click
mousemove
type
key
debug
bakers
stdin
Use environment variable YDOTOOL_SOCKET to specify daemon socket.
tone@tonestux ~/d/y/build (master)> ydotool mousemove --absolute -x 100 -y 100
failed to connect socket `/home/tone/.ydotool_socket': No such file or directory
Please check if ydotoold is running.
tone@tonestux ~/d/y/build (master) [2]> ps faux | grep ydo
tone 87358 0.0 0.0 9656 2412 pts/1 S+ 16:11 0:00 | | \_ grep --color=auto ydo
tone 87065 0.0 0.0 2684 1564 ? Ss 16:11 0:00 \_ /usr/local/bin/ydotoold
Anything else I have to do?