免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2448 | 回复: 0
打印 上一主题 下一主题

freeBSD图形界面配置(一)——基本配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-12 02:47 |只看该作者 |倒序浏览

                                                系统是刚装的freeBSD8.0Release,athlon3000+处理器,Nvidia6100集成显卡,明基FP71G显示器,USB鼠标,PS2键盘
首先当然是Xorg的安装,可以用下面的命令安装
pkg_add -r xorg
我输入上面命令后提示xorg已经安装,应该是在装系统时已经安装了
然后输入
startx
发现可以成功的启动X,不过不能响应键盘鼠标的输入,使用Xorg -configure产生的xorg.conf文件反倒不能启动X(启动X后可以用ctrl+alt+backspace退出图形界面)
安装kde4
pkg_add_r kde4
同样的,系统提示已经安装kde4
然后告诉X server 启动这个应用程序来代替默认的窗口管理器,这可以通过编辑.xinitrc来完成:
echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc
现在,输入startx就可以启动kde桌面环境了,不过分辨率还不够,另外,我的USB鼠标还是不能用
为了使每个用户都能正常进入kde4桌面环境,需要对每个用户都进行上面的配置(.xinitrc文件)
为了提供图形化的登录界面,还需要编辑/etc/ttys文件,修改其中的ttyv8项,将其改为下面的样子:
ttyv8 "/usr/local/kde4/bin/kdm -nodaemon" xterm on secure
然后输入reboot重启,就能自动出现图形登录界面了,不过郁闷的是似乎不接受我的鼠标键盘输入,
这个问题手册上没写,GOOGLE了一下,改了一堆乱七八糟的配置,其中被改动的文件有:
1)/etc/rc.conf,改到最后是这个样子:
# -- sysinstall generated deltas -- # Sat Dec 12 06:09:48 2009
# Created: Sat Dec 12 06:09:48 2009                           
# Enable network daemons for user convenience.               
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="FreeBSD.domain"
ifconfig_rl0="DHCP"
inetd_enable="YES"
keymap="us.iso"                        #  /var/run/moused.pid";
};
到这里,已经可以响应键鼠的输入了,但是分辨率太低的问题还是没解决,关键是按照我前面的步骤,我的/etc/X11/下还没有xorg.conf呢
只好回到前面,开始修改/root/xorg.conf.new,修改其中的Section "Screen"部分为如下的样子
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        DefaultDepth    24
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes      "1280x1024" "800x600" "640x480"
        EndSubSection
EndSection
其中1280x1024是我的显示器的分辨率
然后startx,很不幸,系统提示只能启动一个X server,怒了,修改/etc/ttys中的ttyv8项:
ttyv8   "/usr/libexec/getty Pc"         cons25  on  secure
#ttyv8  "/usr/local/kde4/bin/kdm -nodaemon"     xterm   on  secure
重启.
开始重新捣腾X配置
运行Xorg -config xorg.conf.new,不行,于是
cp xorg.conf.new xorg.conf.test
vi xorg.conf.test
将其余部分全部删除,只保留Section "Screen"部分
还是不能启动X,报以下错误:
(EE) Failed to load module "fbdev" (module does not exist, 0)
上网求助,在
http://www.linuxquestions.org/questions/bsd-17/x-not-starting-on-freebsd-6.1-release-504004/
找到建议
#cd /usr/ports/x11/nvidia-driver/ && make install clean
但是郁闷的是ports中的驱动只支持32位系统,而我装的是amd64版,上官方网站下驱动吧
官方下载的驱动还不支持8.0系统,哎……
寻找直接安装32位软件的办法无果后,直接装了个xf86-video-nv
cd /usr/ports/x11-drivers/xf86-video-nv
make install clean
完成后继续运行
Xorg -config xorg.conf.new
还是不行
重新运行Xorg -configure之后尝试,继续失败
不管了,直接将xorg.conf.new复制到/etc/X11
cp ~/xorg.conf.new /etc/X11/xorg.conf
然后对其中相应的配置做了改动,比如刷新率,分辨率等
输入startx,终于把分辨率调好了,但是新问题又来了,我的鼠标呢?鼠标移动的时候倒是可以看到偶尔有地方变量,并且可以点击,说明鼠标输入还是有的,但是指针不见了
这个问题我以前遇见过,修改xorg.conf中的 Section "Device"部分,在下面增加一句:Option "HWCursor" "false",重启x window 就可以看见了
最后将/etc/ttys中ttyv8项修改回来,reboot一下,一切都是那么美好,唯一有点瑕疵的是任务栏右侧没有顶到屏幕边沿,这个直接拖一下就好了
明天继续整中文显示
附:最后我的xorg.conf
Section "ServerLayout"                  
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0     
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection                                       
Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"  
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection                                             
Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"   
        Load  "record"
EndSection            
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"      
EndSection                     
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection                                 
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    31.5-64.0      
        VertRefresh  56.0-65.0      
        Option       "dpms"         
EndSection                           
Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"            
        ### [arg]: arg optional                                      
        #Option     "SWcursor"                  # []           
        #Option     "HWcursor"                  # []           
        #Option     "NoAccel"                   # []           
        #Option     "ShadowFB"                  # []           
        #Option     "UseFBDev"                  # []           
        #Option     "Rotate"                    # []            
        #Option     "VideoKey"                  #                 
        #Option     "FlatPanel"                 # []           
        #Option     "FPDither"                  # []           
        #Option     "CrtcNumber"                #                 
        #Option     "FPScale"                   # []           
        #Option     "FPTweak"                   #                 
        #Option     "DualHead"                  # []           
        Identifier  "Card0"
        Driver      "nv"
        VendorName  "nVidia Corporation"
        BoardName   "C51G [GeForce 6100]"
        BusID       "PCI:0:5:0"
        Option      "HWCursor" "false"
EndSection
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     1
                Modes     "1280x1024"
        EndSubSection
EndSection
Section "ServerLayout"                  
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0     
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection                                       
Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"  
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection                                             
Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"   
        Load  "record"
EndSection            
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"      
EndSection                     
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection                                 
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    31.5-64.0      
        VertRefresh  56.0-65.0      
        Option       "dpms"         
EndSection                           
Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"            
        ### [arg]: arg optional                                      
        #Option     "SWcursor"                  # []           
        #Option     "HWcursor"                  # []           
        #Option     "NoAccel"                   # []           
        #Option     "ShadowFB"                  # []           
        #Option     "UseFBDev"                  # []           
        #Option     "Rotate"                    # []            
        #Option     "VideoKey"                  #                 
        #Option     "FlatPanel"                 # []           
        #Option     "FPDither"                  # []           
        #Option     "CrtcNumber"                #                 
        #Option     "FPScale"                   # []           
        #Option     "FPTweak"                   #                 
        #Option     "DualHead"                  # []           
        Identifier  "Card0"
        Driver      "nv"
        VendorName  "nVidia Corporation"
        BoardName   "C51G [GeForce 6100]"
        BusID       "PCI:0:5:0"
        Option      "HWCursor" "false"
EndSection
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     1
                Modes     "1280x1024"
        EndSubSection
EndSection
Section "ServerLayout"                  
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0     
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection                                       
Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"  
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection                                             
Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"   
        Load  "record"
EndSection            
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"      
EndSection                     
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection                                 
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    31.5-64.0      
        VertRefresh  56.0-65.0      
        Option       "dpms"         
EndSection                           
Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"            
        ### [arg]: arg optional                                      
        #Option     "SWcursor"                  # []           
        #Option     "HWcursor"                  # []           
        #Option     "NoAccel"                   # []           
        #Option     "ShadowFB"                  # []           
        #Option     "UseFBDev"                  # []           
        #Option     "Rotate"                    # []            
        #Option     "VideoKey"                  #                 
        #Option     "FlatPanel"                 # []           
        #Option     "FPDither"                  # []           
        #Option     "CrtcNumber"                #                 
        #Option     "FPScale"                   # []           
        #Option     "FPTweak"                   #                 
        #Option     "DualHead"                  # []           
        Identifier  "Card0"
        Driver      "nv"
        VendorName  "nVidia Corporation"
        BoardName   "C51G [GeForce 6100]"
        BusID       "PCI:0:5:0"
        Option      "HWCursor" "false"
EndSection
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     1
                Modes     "1280x1024"
        EndSubSection
EndSection
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/105027/showart_2118623.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP