linux显示方式的修改

来源:互联网 发布:大型网络监控怎么安装 编辑:程序博客网 时间:2024/05/17 23:15

在linux下显示方式设置:

  # 0 - 停机(千万不能把initdefault 设置为0 )

  # 1 - 单用户模式

  # 2 - 多用户,没有 NFS

  # 3 - 完全多用户模式(标准的运行级)

  # 4 - 没有用到

  # 5 - X11 (xwindow)

  # 6 - 重新启动 (千万不要把initdefault 设置为6 )

比如命令行下输入:init 1就进入的单用户的命令行模式,init 5就进入的window模式。在安装vmware tool过程中就需要使用命令行模式下进行配置。

按照完vm之后,安装于其下的linux就可以设置显示方式了。步骤如下:

1)在Xwindow下新建一个终端,输入init 1;
2)进入命令行模式后,进入到/etc/X11,命令:cd /etc/X11;
3)vi XF86Config
4)修改显示相关参数:Section "Screen" 中的Subsection "Display"下的Modes       "640x480"修改一下即可。
5)保存好之后再命令行中输入init 5即可回到xwindow环境下。

以下是XF86Config的配置文件全文,供大家参考:

# XFree86 4 configuration created by pyxf86config

Section "ServerLayout"
 Identifier     "Default Layout"
 Screen      0  "Screen0" 0 0
 InputDevice    "Mouse0" "CorePointer"
 InputDevice    "Keyboard0" "CoreKeyboard"
 InputDevice    "DevInputMice" "AlwaysCore"
EndSection

Section "Files"
# RgbPath is the location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

 RgbPath      "/usr/X11R6/lib/X11/rgb"
 FontPath     "unix/:7100"
EndSection

Section "Module"
 Load  "dbe"
 Load  "extmod"
 Load  "fbdevhw"
 Load  "glx"
 Load  "record"
 Load  "freetype"
 Load  "type1"
 Load  "dri"
EndSection

Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds"  "1 2 3"

# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
 Identifier  "Keyboard0"
 Driver      "keyboard"
 Option     "XkbRules" "xfree86"
 Option     "XkbModel" "pc105"
 Option     "XkbLayout" "us"
EndSection

Section "InputDevice"
 Identifier  "Mouse0"
 Driver      "vmmouse"
 Option     "Protocol" "IMPS/2"
 Option     "Device" "/dev/psaux"
 Option     "ZAxisMapping" "4 5"
 Option     "Emulate3Buttons" "no"
EndSection

Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
 Identifier  "DevInputMice"
 Driver      "vmmouse"
 Option     "Protocol" "IMPS/2"
 Option     "Device" "/dev/input/mice"
 Option     "ZAxisMapping" "4 5"
 Option     "Emulate3Buttons" "no"
EndSection


Section "Device"
    Identifier  "VMware SVGA"
    Driver      "vmware"
EndSection

Section "Screen"
 Identifier "Screen0"
    Device      "VMware SVGA"
    Monitor     "vmware"
    # Don't specify DefaultColorDepth unless you know what you're
    # doing. It will override the driver's preferences which can
    # cause the X server not to run if the host doesn't support the
    # depth.
    Subsection "Display"
        # VGA mode: better left untouched
        Depth       4
        Modes       "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       8
        Modes       "800x600"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        Modes       "800x600"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "800x600"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "800x600"
        ViewPort    0 0
    EndSubsection
EndSection

Section "DRI"
 Group        0
 Mode         0666
EndSection

Section "Monitor"
    Identifier      "vmware"
    VendorName      "VMware, Inc"
    HorizSync       1-10000
    VertRefresh     1-10000
EndSection

原创粉丝点击