FreeBSD安装桌面环境

安装Xorg

cd /usr/ports/x11/xorg-minimal
make install clean

pkg install xorg-minimal

如果最小化安装xorg-server,startx启动测试X,需要安装twm、xclock、xterm等。

配置Xorg

快速启动测试X

By default, Xorg usesHAL to autodetect keyboards and mice. The sysutils/hal and devel/dbus ports are automatically installed as dependencies of x11/xorg, but must be enabled by adding these entries to/etc/rc.conf:

  • Check if HAL is used by the X server
pkg info xorg-server | grep HAL
  • If HAL is on, enable needed services by adding two entries to /etc/rc.conf. Then start the services:

hald_enable="YES"
dbus_enable="YES"

service hald start 
service dbus start
  • If the output shows HAL is off,Rename or delete old versions of xorg.conf:
mv /etc/X11/xorg.conf ~/xorg.conf.etc
mv /usr/local/etc/X11/xorg.conf ~/xorg.conf.localetc
  • Once the services have been started, check whether Xorg auto-configures itself by typing:
Xorg -configure
  • Start the X system:
startx
  • Once the test is successful, copy the configuration file to /etc/X11/xorg.conf:
cp xorg.conf.new /etc/X11/xorg.conf
使用字体
  • 安装文泉驿开源字体
pkg install wqy-fonts
  • /etc/X11/xorg.conf里面的Section “Files”小节加入:

FontPath "/usr/local/lib/X11/fonts/wqy"

安装awesome

pkg install awesome
cp /usr/local/etc/xdg/awesome/rc.lua .config/awesome/
echo "exec awesome" > .xinitrc

安装输入法

pkg install zh-fcitx
pkg install zh-fcitx-configtool

设置XMODIFIERS变量,gtk、qt支持:

  • csh/tcsh

setenv XMODIFIERS @im=fcitx
setenv GTK_IM_MODULE fcitx
setenv GTK3_IM_MODULE ximcp

  • sh/bash
    

export XMODIFIERS='@im=fcitx'
export GTK_IM_MODULE=fcitx
export GTK3_IM_MODULE=xim

For Qt4 programs, we recommend you to use:
qtconfig-qt4: /usr/ports/misc/qt4-qtconfig
instead of to manually set QT4_IM_MODULE.

To start fcitx with your desktop, just

cp /usr/local/share/applications/fcitx.desktop ~/.config/autostart/

或在.xinitrc中添加

fcitx &

参考:http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config-quick-start.html

posted @   孤逐王  阅读(2087)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示