Search code examples
ubuntumousexdotool

ubuntu 12.40 get mouse position from SSH


i need to obtain the position (x,y) of pointer, but i need this from external connection (SSH). In desktop, works with this:

xdotool getmouselocation

But when i run the command from SSH (remote), giveme the error:

Error: Can't open display: (null)

Thanks.


Solution

  • Enable X11 forwarding using the ssh -X flag.