leemdk
(Lee Madikas)
October 20, 2024, 11:23am
1
Hello,
I have the following command that I would like to run at start up automatically without having to enter any passwords. This is for ydotool, and I have read their page and the suggestions did not work for me. Any ideas?
sudo -b ydotoold --socket-path=“$HOME/.ydotool_socket” --socket-own=“$(id -u):$(id -g)”
vgaetera
(Vladislav Grigoryev)
October 20, 2024, 4:21pm
2
Copy-paste the entire block of code to the terminal:
Ydotool not working on Fedora 40? - #4 by vgaetera
leemdk
(Lee Madikas)
October 21, 2024, 6:55am
3
Thanks for the reply.
I just tried this and rebooted, but unfortunately the daemon still did not run at start up.
Any ideas?
leemdk
(Lee Madikas)
October 21, 2024, 5:42pm
7
This is the output (after I put the sudo -b ydotoold --socket-path=“$HOME/.ydotool_socket” --socket-own=“$(id -u):$(id -g)” command).
lee@leenux:~$ ls -l -Z /tmp/.ydotool_socket; echo ${YDOTOOL_SOCKET}; groups
srw-rw----. 1 root input system_u:object_r:tmp_t:s0 0 Oct 21 15:33 /tmp/.ydotool_socket
/home/lee/.ydotool_socket
lee wheel input
1 Like
leemdk
(Lee Madikas)
October 21, 2024, 5:52pm
9
It outputs the following:
lee@leenux:~$ ydotool key 42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0
LOLlee@leenux:~$ LOL
Ydotool works in general. I just want to not have to enter the command from my first post at every startup in order for it to work.
leemdk
(Lee Madikas)
October 21, 2024, 6:11pm
11
How can I change it? Will this make it autorun at start up?
leemdk
(Lee Madikas)
October 21, 2024, 6:39pm
13
lee@leenux:~$ grep -r -e YDOTOOL_SOCKET /etc/profile* ~/.bash*; echo ${SHELL}
/etc/profile.d/ydotool.sh:export YDOTOOL_SOCKET=“/tmp/.ydotool_socket”
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0; sleep 2; YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 20
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key --key-delay 0 --key 14
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0;
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0; sleep 2; YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 32:1 32:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 14:1 14:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 56:1 106:1 106:0 56:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 102:1 102:0 125:0
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 102:1 102:0 125:0
/home/lee/.bash_history:export YDOTOOL_SOCKET=“/tmp/.ydotool_socket”
/home/lee/.bash_history:export YDOTOOL_SOCKET=“/tmp/.ydotool_socket”
/home/lee/.bash_history:YDOTOOL_SOCKET=“$HOME/.ydotool_socket” ydotool key 125:1 56:1 106:1 106:0 56:0 125:0
/home/lee/.bash_history:ls -l -Z /tmp/.ydotool_socket; echo ${YDOTOOL_SOCKET}; groups
/home/lee/.bashrc:export YDOTOOL_SOCKET=“$HOME/.ydotool_socket”
/bin/bash
How can I use the correct socket path?
1 Like
vgaetera
(Vladislav Grigoryev)
October 21, 2024, 6:41pm
14
This should fix the path to the socket:
sed -i -e '/YDOTOOL_SOCKET/d' ~/.bashrc
leemdk
(Lee Madikas)
October 21, 2024, 7:29pm
15
Thank you very much, this worked!
1 Like