enigo-rs / enigo

Cross platform input simulation in Rust
MIT License
1.08k stars 107 forks source link

Better Installation Instructions for Arch Linux #64

Closed maxbla closed 5 years ago

maxbla commented 5 years ago

OS: Arch Linux Enigo version: 0.0.12 I kept getting a linker error (/usr/bin/ld: cannot find -lxdo) when building a very simple program, specifically this one:

extern crate enigo;
use enigo::{Enigo, MouseControllable};

fn main() {
    let mut enigo = Enigo::new();
    enigo.mouse_move_to(500, 200);
}

The error read:

/usr/bin/ld: cannot find -lxdo

on Arch Linux, packages are named differently from Ubuntu. apt install libxdo-dev (the recommendation from the readme) does not help. To get this working on arch, I had to use

pacman -S xdotool

This command should probably be added to the README. It took me several minutes to discover the right package to install through trial and error, and I thought the enigo crate might simply not work on Arch.

pythoneer commented 5 years ago

Thanks for your suggestions and sorry for your struggle. I think about it and maybe its a better way to link to another documentation (maybe xdo itself) because otherwise we need to have install instructions for every distribution.

maxbla commented 5 years ago

The xdotool website has installation instructions for other OSs, but it doesn't include Arch! https://www.semicomplete.com/projects/xdotool/. I filed an issue there.

pythoneer commented 5 years ago

Thanks, that's a good idea!