Calculate the DPI resolution of your display
I needed this when X displayed LyX with huge fonts. You can change the font's DPI setting when using Gnome (I didn't find it immediately): settings...fonts...details (very small button)
or without Gnome/supposedly KDE you can edit your ~/.xsession to execute
Now the brain-part (calculation): Pythagoras' theorem
is used to calculate the pixel-diagonal of your screen resolution (c) and c divided by the size of your monitor (screen diagonal in inches) yields the DPI
Example: 1024x768 on 15 inch (in german: "Zoll") screen
Google to the rescue! Example calculation for 1280x1024 on 17 inch screen
or without Gnome/supposedly KDE you can edit your ~/.xsession to execute
xrdb ~/.Xresourceand in the .Xresource you add a line (replace with what you calculated)
Xft*dpi: 85But at least with gnome the second method does not work because gnome overrides this value with sheer brutality (try the fist method).
Now the brain-part (calculation): Pythagoras' theorem
a^2 + b^2 = c^2
is used to calculate the pixel-diagonal of your screen resolution (c) and c divided by the size of your monitor (screen diagonal in inches) yields the DPI
Example: 1024x768 on 15 inch (in german: "Zoll") screen
sqrt(1024^2 + 768^2) / 15 = ~85 DPI
Google to the rescue! Example calculation for 1280x1024 on 17 inch screen