0

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.

pdw
  • 8,359
  • 2
  • 29
  • 41
CRIMUVI
  • 121
  • 1
  • 10

2 Answers2

2

Enable X11 forwarding using the ssh -X flag.

pdw
  • 8,359
  • 2
  • 29
  • 41
0
export DISPLAY=:0.0 && xdotool getmouselocation

Just export display

funivan
  • 3,323
  • 1
  • 14
  • 19