How to change DPI on linux

<!--[if !supportLists]-->1.    <!--[endif]-->How to check the dpi settings?

 

CentOs  :

1. Use conmand : $ xdpyinfo |grep resolution(the original dimension is 1024*768 by command xdpyinfo |grep dimension)

The original DPI (101 108 )

 

2. DPI formula         W_DPI = (dimension * 2.54)/Width

                             H_DPI = (dimension * 2.54)/Height

3. Use the command of vidtune to check whether is support to setting DPI

 

<!--[if !supportLists]-->2.    <!--[endif]-->How to set  the dpi settings?

Centos

Now we want to change the DPI to 120 120.

So according to formula , the Width = 1024 * 2.54 /120 = 21.67 cm

                                      Height = 768 * 2.54 /120 = 16.25 cm      

 

2.Centos:

          1.Make sure the information of “Monitor ” use by os (see the file by command: $more /var/log/Xorg.0.log )

From the log you can see the Monitor information (search key word “Monitor”)

Such  

                   2.vi /etc/X11/xorg.conf

                   3. add the content as below :

                            

                                      Section "Monitor"

Identifier     "Montior0"

ModelName        "XX" (the value of XX can see from /var/log/Xorg.0.log )

   DisplaySize   217 163

EndSection

 

                             Section "Screen"

Identifier     "Screen0"

Device         "Device0

    Monitor        "Monitor0" (The value is the same as monitor identifier)

    DefaultDepth    24

    SubSection "Display"

        Depth          24

        Modes          "1024X768”

    EndSubSection

EndSection

 

                   4.reboot the os

          4. Check the dpi result by command $ xdpyinfo |grep resolution

你可能感兴趣的:(change)