xdotool doesn't work via SSH

Franklin84 picture Franklin84 · Jun 28, 2014 · Viewed 8.8k times · Source

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.

Answer

funivan picture funivan · Nov 10, 2014
export DISPLAY=:0.0 && xdotool key a

Try this =)