[hllug] How to set the correct GUI DPI for your monitor

  • From: Lee Parmeter <geek@xxxxxxxxxxxxxx>
  • To: hllug@xxxxxxxxxxxxx
  • Date: Sun, 18 Jan 2009 20:55:14 -0600

I was having a problem with video playback not using the whole screen area and discovered it was resolved when I set the display size and DPI's to the correct values. My laptop's detected display size was way off, so getting it set correctly made a big difference.


1. First you can check what X thinks your display size is with the following command:

# sdpyinfo |grep dimensions

Output is something like:
dimensions:  1152x864 pixels (353x261 millimeters)

2. Now measure your monitor in mm and compare the values with the output of the command above. If it's not correct, you'll need to edit "/etc/X11/xorg.conf" and add the following to the "Monitor" Section. (see man xorg.conf for complete details).

DisplaySize  width height

Where width and height are in mm.

3. Restart X by logging out of your GUI session and then hit "CTRL-ALT-BKSP" before logging back in. Then run xdpyinfo again to see if it was corrected.

# sdpyinfo |grep dimensions

4. Now we need to check to see what X calculated the DPI to be.

# cat /var/log/Xorg.0.log |grep DPI

The output should be something like: DPI set to (value1, value2).

5. Now set your GUI DPI resolution to a value within the range of value1 to value2.

On Gnome, you set the DPI in the following location: "System-Preferences-Appearance-Fonts-Details"

6. After you get the DPI set correctly, adjust the various font sizes to suit.

-Lee
______________________________________________________________________________
Highland Lakes Linux User Group (HLLUG): http://www.hllug.org
HLLUG mailing list: //www.freelists.org/list/hllug

Other related posts:

  • » [hllug] How to set the correct GUI DPI for your monitor - Lee Parmeter