Install package xdotool
sudo apt-get install xdotool
Now run following command to get X,Y coordinates of mouse cursor
xdotool getmouselocation
Output will be like this
x:1285 y:10 screen:0