-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Needs sudo before each command #241
Comments
If you launch ydotoold as a system service, you need to specify the directory and owner of its socket so that the ydotool executable can connect to it Launch the daemon with the following arguments: |
@cyber-sushi same issue here as well, the problem is that |
@g-h-97 ydotool does support you defining the socket path, it actually queries for an env var named @vdegenne I'd like to ask you to check who is the owner of the socket? I'm considering that you don't have access to the socket, as it's by default owned by root... so you can change that, changing the ownership of the ydotoold socket creation. Using the I think this is issue is repeating itself too much, we should make in a way that ydotoold runs as root, opens the socket already considering the user ownership somehow.... maybe making it #230 can improve that, but I'm not completely sure, it has to be a better way |
@Paiusco , thanks for the heads-up. Still there is the issue of the service getting added as a "user" instead of a "system" service, |
@g-h-97 not necessarily (even tho for now that forces you to recompile it), this was addressed at #237. So you can make the service as a system with a CMake option, or if you don't want to recompile you can just move the file to the system location and systemd will consider it a system service instead |
Thanks for the response @Paiusco. I wrote this simple guide on how to get First copy the user service and edit it (or edit directly using cp /usr/lib/systemd/user/ydotool.service ~
vim ~/ydotool.service Add the argument --socket-own=UID:GID to the line ExecStart=, where UID and GID are the user ID and group ID you want to run
Copy the new service unit to cp ~/ydotool.service /user/lib/systemd/system/ Export the following environment variable in you .zshenv export YDOTOOL_SOCKET=/tmp/.ydotool_socket Start and enable the service and check it's running
Test. This should type "test" on the current terminal window
|
I enabled the service:
But when I reboot, and try running
ydotool ...
I get the following:The only way to get rid of this issue is to use
sudo
before every command, but now I can't useydotool
in scripts because the shell interupts the program asking for the password (which makes sense).Versions:
The text was updated successfully, but these errors were encountered: