Ryandol
非常火狐
非常火狐
  • UID1379
  • 注册日期2004-12-25
  • 最后登录2019-08-17
  • 发帖数970
  • 经验11枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:5055回复:6

死也没有搞定dpi,linux论坛上也没有什么答案,这里问问。

楼主#
更多 发布于:2005-10-21 18:41
screen #0:
  print screen:    no
  dimensions:    1280x1024 pixels (313x230 millimeters)
  resolution:    104x113 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x115
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64

这个是终端里xdpyinfo后的信息,104*113,我的字始终是长方形.....看起来略有不爽,怎么改成100*100啊之类的?
我曾在Xservers里在
:0 local /usr/X11R6/bin/X -nolisten tcp -br vt7 后面加上 -dpi 100,无效果。

附xorg.conf文件内容。


# /.../
# SaX generated X11 config file
# Created on: 2005-10-20T17:40:03+0800.
#
# Version: 7.1
# Contact: Marcus Schaefer <sax@suse.de>, 2002
#
# Automatically generated by [ISaX] (7.1)
# PLEASE DO NOT EDIT THIS FILE!
#
Section "Files"
  FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/local"
  FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
  FontPath     "/usr/X11R6/lib/X11/fonts/URW"
  FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"
  FontPath     "/usr/X11R6/lib/X11/fonts/PEX"
  FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic"
  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/misc:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/75dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/100dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/Type1"
  FontPath     "/usr/X11R6/lib/X11/fonts/latin7/75dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/baekmuk:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/japanese:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/kwintv"
  FontPath     "/usr/X11R6/lib/X11/fonts/truetype"
  FontPath     "/usr/X11R6/lib/X11/fonts/uni:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/CID"
  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/misc:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/75dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/100dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/misc:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/75dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/100dpi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/Type1"
  FontPath     "/usr/X11R6/lib/X11/fonts/misc/sgi:unscaled"
  FontPath     "/usr/X11R6/lib/X11/fonts/xtest"
  FontPath     "/opt/kde3/share/fonts"
  InputDevices "/dev/ttyS0"
  InputDevices "/dev/ttyS1"
  InputDevices "/dev/ttyS2"
  InputDevices "/dev/ttyS3"
  InputDevices "/dev/ttyS4"
  InputDevices "/dev/ttyS5"
  InputDevices "/dev/ttyS6"
  InputDevices "/dev/ttyS7"
  InputDevices "/dev/ttyS8"
  InputDevices "/dev/psaux"
  InputDevices "/dev/logibm"
  InputDevices "/dev/sunmouse"
  InputDevices "/dev/atibm"
  InputDevices "/dev/amigamouse"
  InputDevices "/dev/atarimouse"
  InputDevices "/dev/inportbm"
  InputDevices "/dev/gpmdata"
  InputDevices "/dev/mouse"
  InputDevices "/dev/usbmouse"
  InputDevices "/dev/adbmouse"
  InputDevices "/dev/input/mice"
  InputDevices "/dev/input/event0"
  InputDevices "/dev/pointer0"
  InputDevices "/dev/pointer1"
  InputDevices "/dev/pointer2"
  InputDevices "/dev/pointer3"
EndSection

Section "ServerFlags"
  Option       "AllowMouseOpenFail"
EndSection

Section "Module"
  Load         "glx"
  Load         "type1"
  Load         "extmod"
  Load         "dbe"
  Load         "freetype"
  Load         "v4l"
EndSection

Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "pc104"
  Option       "XkbRules" "xfree86"
EndSection

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "9"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "Razer Diamondback Optical Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
  DisplaySize  310 230
  HorizSync    28-85
  Identifier   "Monitor[0]"
  ModelName    "SYNCMASTER 795DF/795MB SYNCMASTER MAGIC CD175GP"
  VendorName   "SAMSUNG"
  VertRefresh  50-160
  UseModes     "Modes[0]"
EndSection

Section "Modes"
  Identifier   "Modes[0]"
  Modeline "1280x1024" 145.69 1280 1328 1464 1744 1024 1025 1028 1071
  Modeline "1280x960" 135.32 1280 1368 1504 1728 960 961 964 1004
  Modeline "1280x960" 116.18 1280 1360 1496 1712 960 961 964 998
  Modeline "1280x960" 97.68 1280 1352 1488 1696 960 961 964 993
  Modeline "1280x800" 144.76 1280 1376 1512 1744 800 801 804 847
  Modeline "1280x800" 128.04 1280 1368 1504 1728 800 801 804 842
  Modeline "1280x800" 111.77 1280 1360 1496 1712 800 801 804 837
  Modeline "1280x800" 95.95 1280 1352 1488 1696 800 801 804 832
  Modeline "1280x800" 80.58 1280 1344 1480 1680 800 801 804 827
  Modeline "1152x864" 125.43 1152 1232 1360 1568 864 865 868 909
  Modeline "1152x864" 109.43 1152 1224 1352 1552 864 865 868 904
  Modeline "1152x864" 93.90 1152 1224 1344 1536 864 865 868 899
  Modeline "1152x864" 78.82 1152 1216 1336 1520 864 865 868 894
  Modeline "1280x768" 137.68 1280 1368 1504 1728 768 769 772 813
  Modeline "1280x768" 122.87 1280 1368 1504 1728 768 769 772 808
  Modeline "1280x768" 107.23 1280 1360 1496 1712 768 769 772 803
  Modeline "1280x768" 92.15 1280 1352 1488 1696 768 769 772 799
  Modeline "1280x768" 77.37 1280 1344 1480 1680 768 769 772 794
  Modeline "1024x768" 110.91 1024 1096 1208 1392 768 769 772 813
  Modeline "1024x768" 97.84 1024 1088 1200 1376 768 769 772 808
  Modeline "1024x768" 86.18 1024 1088 1200 1376 768 769 772 803
  Modeline "1024x768" 73.89 1024 1080 1192 1360 768 769 772 799
  Modeline "1024x768" 61.89 1024 1080 1184 1344 768 769 772 794
  Modeline "800x600" 90.10 800 856 944 1088 600 601 604 647
  Modeline "800x600" 82.55 800 856 944 1088 600 601 604 643
  Modeline "800x600" 73.98 800 848 936 1072 600 601 604 639
  Modeline "800x600" 66.71 800 848 936 1072 600 601 604 635
  Modeline "800x600" 58.73 800 840 928 1056 600 601 604 632
  Modeline "800x600" 51.73 800 840 928 1056 600 601 604 628
  Modeline "800x600" 44.13 800 840 920 1040 600 601 604 624
  Modeline "800x600" 36.88 800 832 912 1024 600 601 604 621
  Modeline "768x576" 82.67 768 824 904 1040 576 577 580 621
  Modeline "768x576" 75.72 768 824 904 1040 576 577 580 617
  Modeline "768x576" 67.79 768 816 896 1024 576 577 580 613
  Modeline "768x576" 61.21 768 816 896 1024 576 577 580 610
  Modeline "768x576" 53.75 768 808 888 1008 576 577 580 606
  Modeline "768x576" 47.41 768 808 888 1008 576 577 580 603
  Modeline "768x576" 40.41 768 800 880 992 576 577 580 599
  Modeline "768x576" 33.74 768 792 872 976 576 577 580 596
  Modeline "640x480" 62.12 640 680 752 864 480 481 484 521
  Modeline "640x480" 57.18 640 680 752 864 480 481 484 517
  Modeline "640x480" 51.43 640 680 744 848 480 481 484 514
  Modeline "640x480" 46.80 640 680 744 848 480 481 484 511
  Modeline "640x480" 42.22 640 680 744 848 480 481 484 508
  Modeline "640x480" 36.97 640 672 736 832 480 481 484 505
  Modeline "640x480" 32.64 640 672 736 832 480 481 484 503
  Modeline "640x480" 27.74 640 664 728 816 480 481 484 500
  Modeline "640x480" 23.06 640 656 720 800 480 481 484 497
EndSection

Section "Screen"
  DefaultDepth 24
  SubSection "Display"
    Depth      15
    Modes      "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1024x768" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      16
    Modes      "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1024x768" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      24
    Modes      "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1024x768" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      32
    Modes      "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1024x768" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      8
    Modes      "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1024x768" "800x600" "768x576" "640x480"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection

Section "Device"
   Option      "RenderAccel" "true"
   Option      "AllowGLXWithComposite" "true"
  BoardName    "GeForce FX 5700 Ultra"
  BusID        "2:0:0"
  Driver       "nvidia"
  Identifier   "Device[0]"
  #Option       "NvAGP" "2"
  #Option       "NvAGP" "0"
  #Option       "NvAGP" "3"
  #Option       "NvAGP" "1"
  Screen       0
  VendorName   "NVidia"
EndSection

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection

Section "DRI"
    Group      "video"
    Mode       0660
EndSection

Section "Extensions"
    Option "Composite" "Enable"
EndSection

Section "Extensions"
EndSection
刚搞了一个 for Firefox & Opera only 的 Blog:
http://www.onepx.com/
su100
火狐狸
火狐狸
  • UID107
  • 注册日期2004-11-25
  • 最后登录2013-08-19
  • 发帖数289
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
1楼#
发布于:2005-10-21 18:41
Ryandol
非常火狐
非常火狐
  • UID1379
  • 注册日期2004-12-25
  • 最后登录2019-08-17
  • 发帖数970
  • 经验11枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2005-10-21 18:41
修改 /etc/X11/xinit/xserverrc 试试

“exec /usr/bin/X11/X ” 如果后面没有 -dpi 100 就加上

like this “exec /usr/bin/X11/X -dpi 100”

里面这样说的。
我的xserverrc如下,没有找到他们说的 exec /usr/binxxxxxxx这样一行,要自己加么?加在什么地方?

#!/bin/bash

#
# move this file to ~/.xserverrc, if you don't want to allow
# everybody to get access to your X-Server
#

dspnum=":0"
  args=""
  done=no
if test -z "$XAUTHORITY" ; then
  auth="$HOME/.Xauthority"
else
  auth="$XAUTHORITY"
fi

while test -n "$1" ; do
    case "$1" in
\:[0-9])
   dspnum="$1" ;     shift ;;
-auth)
   done=yes
   args="$args $1" ; shift ;;
*)
   args="$args $1" ; shift ;;
    esac
done

# handle TCP port 6000
. /etc/sysconfig/displaymanager
test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \
  args="$args -nolisten tcp"

if test -x "`type -p keygen`" -a "$done" != "yes" ; then
    if [ ! -x  "`type -p hostname`" ] ; then
        echo "startx: can't get my hostname - exiting" 1>&2
exit 1
    else
host=`hostname -f`
    fi

    trap "echo" 1 2 15
    cookie="MIT-MAGIC-COOKIE-1 `keygen`"
     tcpip="$host$dspnum"
      unix="${host%%.*}/unix$dspnum"

    xauth -f $auth source - <<-EOF
add $tcpip $cookie
add $unix  $cookie
add ${host}/unix$dspnum $cookie
EOF
    cookie=

    exec X $dspnum -auth $auth $args
else
    exec X $dspnum $args
fi
刚搞了一个 for Firefox & Opera only 的 Blog:
http://www.onepx.com/
su100
火狐狸
火狐狸
  • UID107
  • 注册日期2004-11-25
  • 最后登录2013-08-19
  • 发帖数289
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
3楼#
发布于:2005-10-21 18:41
不同版本的Linux配置文件总是有点不一样,像我的系统上就根本没有.xserverrc这个文件。
试试在自己的home目录下建一个.xserverrc,文件内容:
#!/bin/bash
exec /usr/bin/X11/X -dpi 100

或者在自己的home目录下建一个.Xresources,内容:
Xft.dpi: 100
Ryandol
非常火狐
非常火狐
  • UID1379
  • 注册日期2004-12-25
  • 最后登录2019-08-17
  • 发帖数970
  • 经验11枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
4楼#
发布于:2005-10-21 18:41
我去试试。
刚搞了一个 for Firefox & Opera only 的 Blog:
http://www.onepx.com/
Ryandol
非常火狐
非常火狐
  • UID1379
  • 注册日期2004-12-25
  • 最后登录2019-08-17
  • 发帖数970
  • 经验11枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
5楼#
发布于:2005-10-21 18:41
Thank you.

只有这个有用。

在自己的home目录下建一个.Xresources,内容:
Xft.dpi: 100
刚搞了一个 for Firefox & Opera only 的 Blog:
http://www.onepx.com/
三翻领
禁止发言
禁止发言
  • UID6501
  • 注册日期2005-06-02
  • 最后登录2017-11-30
  • 发帖数2796
  • 经验-5234枚
  • 威望0点
  • 贡献值-10494点
  • 好评度-5257点
6楼#
发布于:2005-10-21 18:41
用户被禁言,该主题自动屏蔽!
游客

返回顶部