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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值