有价值的键盘自动化工具xdotool
不能在Wayland上工作。ydotool是一个新工具,它模仿了xdotool的一些功能,但在Xorg和Wayland中都能使用。
ydotool
在Ubuntu软件中心的版本为0.1.8-3。同时,这个工具已经被“重构”了,因为它已经被完全重写了,没有外部依赖,并且使用了更少的内存,并且没有动态内存分配。截至2022年6月,版本为1.0.1。
github上只提供了源代码,没有说明如何构建代码和安装该工具。如何安装ydotool1.0.1。在Ubuntu上?
发布于 2022-06-13 13:51:46
下面是我在Ubuntu22.04上测试的安装说明。对于使用cmake的编译说明,应归功于这里。
# Needed for compilation
sudo apt install cmake scdoc pkg-config
# For generating an installable .deb file
sudo apt install checkinstall
# Optional: git to clone the repository instead of downloading zip
sudo apt install git
git clone https://github.com/ReimuNotMoe/ydotool
cd ydotool
mkdir build && cd build
cmake ..
make -j `nproc`
sudo checkinstall --install=no
在checkinstall
中,建议将包的拟议名称build
更改为ydotool-custom
。这样,以后就可以很容易地识别它,并且不会与系统存储库的现有ydotool
包发生冲突。
# Install the .deb that checkinstall generated
sudo apt install ./build_*_amd64.deb
# Set the suid bit so ydotool can be run by any user
sudo chmod +s /usr/local/bin/ydotool
# Install systemd service
sudo ln -s /usr/lib/systemd/user/ydotool.service /etc/systemd/system/
# Reload the systemd daemon
sudo systemctl daemon-reload
sudo service ydotool start
https://askubuntu.com/questions/1413829
复制相似问题