(1).安装Gnome和Xorg
插入光盘,使用root权限登录,执行”sysinstall”,选择”Configure”-“Packages”,选择介质类型,使用光标和空格来选择gnome中的”gnome2-2.32.1_3”,其他依赖的包会自动给选上。然后转到”X11″,选择”xorg-7.5.1″,最后等待安装。
(2).系统配置
编辑vi /etc/rc.conf,添加
hald_enable="YES" dbus_enable="YES"
设置系统hostsname
编辑vi /etc/rc.conf,添加
hostname="hostname"
切换到当前用户的HOME目录,配置Gnome启动项,vi ~/.xinitrc,在.xinitrc中添加
exec gnome-session
或者在/etc/rc.conf添加
gnome_enable="YES"
配置本地化语言集为简体中文,在当前用户的shell中添加语言环境变量即可。
csh用户,编辑vi ~/.cshrc,在.cshrc文件中添加
setenv LANG zh_CN.eucCN setenv LC_LANG zh_CN.eucCN
在环境变量中设置LANG,LC_LANG
LANG zh_CN.eucCN LC_LANG zh_CN.eucCN
(3).X桌面配置
使用root权限执行”Xorg -configure”命令,将在root的HOME目录生成xorg.conf.new文件,测试Xorg的命令为”Xorg -config.conf.new”,执行完这条命令后,一般使用Ctr+Alt+F2
切换到其他终端然后再Alt+F1再使用Ctrl+C关闭。
如果出现无法加载鼠标和键盘的情况,再编辑/etc/rc.conf文件,添加
moused_enable="YES"
配置刷新频率范围,编辑vi xorg.conf.new,在Section-“Monitor”项目中添加HorizSync,VertRefresh的配置
Section "Monitor" Identifier "Monitor0" VendorName "MonitorVendor" ModelName "MonitorModel" HorizSync 30.0 - 50.0 VertRefresh 40.0 - 90.0 EndSection
配置屏幕分辨率和颜色深度,在Section-“Screen”项目中配置如下
Section"Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1280*1024" EndSubSection EndSection
然后保存退出,执行命令”cp xorg.conf.new /etc/X11/xorg.conf”即可。
(4).字体配置
将Windows的”tahoma.ttf”和”simsun.ttc”复制到FreeBSD系统下面,执行命令
mkdir/usr/X11R6/lib/X11/fonts/TrueType cp simsun.ttc /usr/X11R6/lib/X11/fonts/TrueType/simsun.ttf cp tahoma.ttf /usr/X11R6/lib/X11/fonts/TrueType/tahoma.ttf ttmkfdir >fonts.dir
然后修改xorg字体配置,执行命令”vi /etc/X11/xorg.conf”,在项目中Section-“Files”加入刚刚建立的字体库:
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
最后执行命令”starx”就可以启动X桌面了,如果开机就自动启动starx,需在/etc/rc.conf 里面添加
gdm_enable="YES" gnome_enable="YES"
另外Gnome需要挂载/proc文件系统才能正常运行,在/etc/fstab文件中添加
proc /proc procfs rw 0 0
Recent Comments