I'd like to be able to display the current location of the pointer on the X display. Is there any application which does this?
There's a package called
xdotool that has an application named
getmouselocation, available from ubuntu repositories with
sudo apt-get install xdotool. Running the command
x:1285 y:10 screen:0
- Install xdotool
Open a terminal and paste this:
while true; do clear; xdotool getmouselocation; sleep 0.1; done
Move the cursor over the screen and you will see live coordinates update on terminal.
Here's a python script:
#!/usr/bin/python from Xlib import display c = display.Display().screen().root.query_pointer()._data x = c["root_x"] y = c["root_y"] print x, y
Save it to file,
chmod +x it, and see ot it gives.
xev from the command line shows this. Try the following.
Current coordinates are displayed as
Not a native Linux solution, but if you have Wine installed, Pixie is a free (as in beer) small app that will show you both your cursor's coordinates and the color of the pixel directly underneath it in several formats.