Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical question (for creating PPA & using for touchpad gestures) #25

Open
swanux opened this issue Sep 24, 2019 · 20 comments
Open

Technical question (for creating PPA & using for touchpad gestures) #25

swanux opened this issue Sep 24, 2019 · 20 comments

Comments

@swanux
Copy link

swanux commented Sep 24, 2019

Hello,
I'd like to make a PPA for Ubuntu/Debian based distros of your project. My question is, what this program uses from boost-libs? Because Debian based distros hasn't got a separate boost-libs package so I need to intall the complete libboost-all-dev to be sure that the required function is included, but it's over 500MB.

Thank you in advance,
Daniel

@ReimuNotMoe
Copy link
Owner

Only libboost-program-options-dev is needed.

@swanux
Copy link
Author

swanux commented Sep 26, 2019

Thank you!
Another question. I've built the program but it says:

ydotool: error while loading shared libraries: libydotool.so: cannot open shared object file: No such file or directory

The commands were:
mkdir build && cd build && cmake .. && make && sudo make install
It installs everything to /usr/local/ instead of /usr/ (on Arch it places everything inside /usr/).

I've tried a workaround (placed everything inside /usr/ like on Arch), and the error disappeard.
However it produces the following output:

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool

ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open uinput device
Aborted (core dumped)

@ClassicOldSong
Copy link
Collaborator

Checkout #24

@swanux
Copy link
Author

swanux commented Sep 27, 2019

As I mentioned the workaround worked, but produced another error. Same with symlinks.

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool

ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open uinput device
Aborted

@gapeevanton
Copy link

gapeevanton commented Sep 27, 2019

First of all, thanks to author for this great automation tool.

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool
ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open uinput device
Aborted

I am on Fedora 29 and do this commands:

sudo usermod -a -G users $USER
echo "KERNEL==\"uinput\", GROUP=\"users\", MODE=\"0660\", OPTIONS+=\"static_node=uinput\"" | sudo tee /etc/udev/rules.d/80-uinput.rules > /dev/null

Reboot

Check:

ls -l /dev/uinput

Should output smth like:

crw-rw----. 1 root users 10, 223 Sep 27 11:23 /dev/uinput'

@ClassicOldSong
Copy link
Collaborator

As I mentioned the workaround worked, but produced another error. Same with symlinks.

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool
ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open uinput device
Aborted

O wait, did you run ydotool with root permission? For it'll create a fake input device, it needs root in order to work.

@ClassicOldSong
Copy link
Collaborator

First of all, thanks to author for this great automation tool.

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool
ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open uinput device
Aborted

I am on Fedora 29 and do this commands:

sudo usermod -a -G users $USER
echo "KERNEL==\"uinput\", GROUP=\"users\", MODE=\"0660\", OPTIONS+=\"static_node=uinput\"" | sudo tee /etc/udev/rules.d/80-uinput.rules > /dev/null

Reboot

Check:

ls -l /dev/uinput

Should output smth like:

crw-rw----. 1 root users 10, 223 Sep 27 11:23 /dev/uinput'

This could be less secure if you do so for any application may able to type anything from the uinput device using your username/group.

@swanux
Copy link
Author

swanux commented Sep 27, 2019

Thank you @gapeevanton ! Now it works. There is still error in the output but it works without problems.

ydotool: library search path: /usr/local/lib/ydotool:/usr/lib/ydotool:/usr/lib/x86_64-linux-gnu/ydotool:/usr/lib/i386-linux-gnu/ydotool

ydotool: notice: ydotoold backend unavailable, using direct method (has latency+delay issues!)
ydotool: debug: tool `key' constructed at 0x562efbb14460
argc = 3
argv[1] = send
argv[2] = Ctrl+Alt+Right

Regarding security, I agree with you @ClassicOldSong . The problem is that I'd like to use this for some touchpad gestures so I won't be able to run everytime as root. Any idea for that?

@swanux swanux changed the title Technical question (for creating PPA) Technical question (for creating PPA & using for touchpad gestures) Sep 27, 2019
@swanux
Copy link
Author

swanux commented Sep 28, 2019

And what is ydotool backend which is unavailable? Because I can see that it really affects the speed of the tool.

@ReimuNotMoe
Copy link
Owner

And what is ydotool backend which is unavailable? Because I can see that it really affects the speed of the tool.

See #5

@ReimuNotMoe
Copy link
Owner

This project is really lack of some docs and I feel very sorry for that. I'll work on these when I squeezed more time.

@swanux
Copy link
Author

swanux commented Oct 2, 2019

Ah, ok, I see now. I could have thought of it. And regarding the permissions problem have you got any idea? (for touchpad gestures)

@swanux
Copy link
Author

swanux commented Oct 10, 2019

Here's a .deb file @ReimuNotMoe that you can test, and tell me if I can upload it. It doesn't contain that modification with permissions because of the security.
https://file.io/rfddYw

@ClassicOldSong
Copy link
Collaborator

Here's a .deb file @ReimuNotMoe that you can test, and tell me if I can upload it. It doesn't contain that modification with permissions because of the security.
https://file.io/rfddYw

link 404 not found

@swanux
Copy link
Author

swanux commented Oct 10, 2019

File.io... Sometimes it's just nonsense how it behaves..
Here's another link. Hopefully it'll work as expected.
https://mega.nz/#!pSBTjKCD!75lCCcLbnriKg-ZIoE2PJi7o7kSKdh0leuWTvqQRIXQ
Tell me whether it works or not.

@swanux swanux closed this as completed Oct 20, 2019
@ReimuNotMoe ReimuNotMoe reopened this Oct 27, 2019
@ReimuNotMoe
Copy link
Owner

File.io... Sometimes it's just nonsense how it behaves..
Here's another link. Hopefully it'll work as expected.
https://mega.nz/#!pSBTjKCD!75lCCcLbnriKg-ZIoE2PJi7o7kSKdh0leuWTvqQRIXQ
Tell me whether it works or not.

Sorry for the delay.

AFAIK, the architecture should be 'amd64' instead of 'all'...

Personally I would like to just use Gitlab CI for debian-ish packages.

What the users want is simply running apt-add-repository from terminal, and get the software installed. However, this requires a PPA, and creating a PPA is really a pain.

Thank you very much anyway.

@swanux
Copy link
Author

swanux commented Oct 27, 2019

I've never heard about gitlab ci before so I've googled it. It's really amazing! It's much more comfortable than building everything manually (I also use build tools, but just some basic self written stuff).

Regarding the PPA, it's really simple with launchpad. You can easily manage it with nearly zero in-terminal stuff. Or if you would like to have your own apt repo, you can do that also simply with github.

@p4vook
Copy link

p4vook commented Nov 13, 2020

I've created a controller for ydotool, that simply transfers commands to ydotool, launching it as root.
https://github.com/pavel-the-best/ydotool-controller.
Usage: launch daemon (ydotool_controllerd) as root, use client (ydotool_controller) with arguments that should be passed to ydotool.

contrun added a commit to contrun/infra that referenced this issue Nov 1, 2021
@sharpordie
Copy link

sharpordie commented Jan 22, 2022

For those who would like to have the latest version of ydotool on Ubuntu.

Tested under Impish (21.10) and Jammy (22.04).

# Handle the dependencies.
sudo apt install -y build-essential cmake git libboost-program-options-dev scdoc

# Handle the installation.
current="$(dirname "$(readlink -f "${0}")")" && git clone https://github.com/ReimuNotMoe/ydotool.git
cd ydotool && mkdir build && cd build && cmake .. && make && sudo make install
cd "${current}" && source "{HOME}/.bashrc" && rm -rf ydotool

Rijul-A added a commit to Rijul-A/dotfiles that referenced this issue Feb 2, 2022
Needs Wayland + ydotool + ruby + fusuma gem + libinput
 - for libinput, run `sudo gpasswd -a $USER input`
 - for ydotool, see ReimuNotMoe/ydotool#25

Features are through keyboard shortcuts in Gnome
 - 3 finger left/right swipe change workspace included in Gnome
 - 4 finger left/right swipe will take the current window with you
 - 2 finger pinch in/out to Zoom included in Gnome (tested with FF)
 - 3 finger pinch in/out to maximize/restore
 - 3 finger hold to show PopOS launcher, 4 finger hold to show overview
 - 4 finger pinch in to hide all windows, pinch out to close current
 - 3 finger up/down swipe to Alt Tab across windows
 - 4 finger up/down swipe to move window to monitor
@tomeeeS
Copy link

tomeeeS commented Jul 16, 2022

"sudo apt install -y build-essential cmake git libboost-program-options-dev scdoc"

I suggest putting this in the readme. Make was failing and I almost quit installing this tool.
Likewise there's no mention of the usage of the ydotoold daemon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants