第 27.3 节 桌面与其他软件

NetBSD 可以使用常见的桌面,如 KDE 4、 GNOME。

xfce

# echo http://mirrors.nju.edu.cn/pkgsrc/packages/NetBSD/x86_64/9.3/All/  > /usr/pkg/etc/pkgin/repositories.cpositories.conf
# pkgin install xfce4 fam slim noto-cjk-fonts
# cp /usr/pkg/share/examples/rc.d/famd /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/slim /etc/rc.d/
# echo rpcbind=YES >> /etc/rc.conf
# echo famd=YES >> /etc/rc.conf
# echo dbus=YES >> /etc/rc.conf
# echo slim=YES >> /etc/rc.conf
# echo xfce4-session >> ~/.xinitrc # root 为 /root,下同
# ln  ~/.xinitrc  ~/.xsession

参考文献:HOWTO install the XFCE 4 Desktop on NetBSD 8.1

Mate

# echo http://mirrors.nju.edu.cn/pkgsrc/packages/NetBSD/x86_64/9.3/All/  > /usr/pkg/etc/pkgin/repositories.cpositories.conf
# pkgin install mate-desktop mate slim fam noto-cjk-fonts
# cp /usr/pkg/share/examples/rc.d/famd /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/slim /etc/rc.d/
# echo rpcbind=YES >> /etc/rc.conf
# echo famd=YES >> /etc/rc.conf
# echo dbus=YES >> /etc/rc.conf
# echo slim=YES >> /etc/rc.conf
# echo exec mate-session >> ~/.xinitrc # root 为 /root,下同
# ln  ~/.xinitrc  ~/.xsession

参考文献:成功尝试在NetBSD9.0中安装Mate桌面环境

KDE 4

警告

在 VB VM 下目前无法正常进入桌面,进去就黑屏,已经报告 NetBSD Problem Report #57554,如果你知道什么原因请告诉我。

目前没有 kde5。需要注意的 NetBSD 的源比较混乱,有时候一个源不能满足要求,要多换几个源看看,换哪个直接谷歌搜索 包名+netbsd.org,如 kde4 netbsd.org,点进去诸如 https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/print/libcups/index.html 域名所提供的。似乎自带了 xorg,不需要单独安装。

经常性的在以下源中进行切换:

# echo http://mirrors.nju.edu.cn/pkgsrc/packages/NetBSD/x86_64/9.0_current/All/  > /usr/pkg/etc/pkgin/repositories.cpositories.conf
# echo http://mirrors.nju.edu.cn/pkgsrc/packages/NetBSD/x86_64/9.0_2023Q2/All/  > /usr/pkg/etc/pkgin/repositories.conf
# pkgin install readline  libcups# 换源 9.0_2023Q2
# pkgin install kde4 hal  noto-cjk-fonts # 使用源 9.0_current,提示缺少依赖不用管,已经安装了,输入 y 回车即可
# cp /usr/pkg/share/examples/rc.d/* /etc/rc.d
# echo kdm=YES >> /etc/rc.conf
# echo hal=YES >> /etc/rc.conf
# echo avahidaemon=YES >> /etc/rc.conf
# echo dbus=YES >> /etc/rc.conf
# echo hostname=ykla >> /etc/rc.conf # 设置主机名,可以替换为你的名字

重启系统。

默认状态下 root 禁止登录。

开启 kdm root 登录

# nano /usr/pkg/etc/kdm/kdmrc

改成

# Allow root logins?
# Default is true
AllowRootLogin=true 

参考文献

最后更新于