A ruler tool is useful to check pixel distances on the display and to check if artifacts in photos are perfectly horizontal or vertical. The Screen Ruler tool on Ubuntu does this job perfectly.
It can be installed easily from Ubuntu repositories:
$ sudo apt-get install screenruler
It can be started from the Dash as Screen Ruler. Note that this application uses Ruby and will install that.
Tried with: Screen Ruler 0.9.6 and Ubuntu 12.04 LTS