I want to use xdotool via SSH but get the following error:
Error: Can't open display: (default)
I found this solution:
export DISPLAY='0:0'
Still get nearly the same error :(. I also tried:
export DISPLAY=:0; or: export DISPLAY="0:0", ...
Always a error like that:
Error: Can't open display: (0:0)
Is thera a alternative (working) solution for xdotool?
I don' know whether It work lokal. I've only got a SSH-connection.
export DISPLAY=:0.0 && xdotool key a
Try this =)
You did the right thing export DISPLAY='0:0'
But you should also set XAUTHORITY like this:
export XAUTHORITY="/home/username/.Xauthority"
Ofcourse the username is an account which has logged in via gnome.
Don't forget to change username with your right account name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With