KRuler
Screen ruler
KRuler is an on-screen ruler for measuring pixels. Position the 0 at your starting point and measure the precise pixel distance between the starting point and your cursor.
KRuler is a tool for measuring the size, in pixels, of items on the screen. . This package is part of the KDE graphics module.
How to install KRuler in Ubuntu
If you are on a supported distro, you can install the application through software center by clicking the below link.
If the above link not working, run the below command in terminal to install kruler in Ubuntu
sudo apt install kruler