A simple command line tool to retrieve the X,Y positions of the mouse cursor.
HERE (getcurpos.c)
gcc -Wall -lX11 getcurpos.c -o getcurpos
Simply run the program and it will print the X and Y coordinates in the format: X Y