FreeBSD 安装 Xfce

发布于 2024-12-04 16:51:04 字数 2444 浏览 14 评论 0

安装 xfce4

以下教程适用于 shell 为 bash/sh/zsh 的用户。

首先看看现在自己的 shell 是不是 sh , bash , zsh

# echo $0

如果是 sh , bash , zsh 其中之一,请继续;

通过 pkg 安装

# pkg install xorg lightdm lightdm-gtk-greeter xfce wqy-fonts

通过 ports 安装

# cd /usr/ports/x11-wm/xfce4
# make install clean

启用 xfce

# echo "/usr/local/etc/xdg/xfce4/xinitrc"  >  ~/.xinitrc

或者

# echo "/usr/local/etc/xdg/xfce4/xinitrc"  >  ~/.xsession

此处为 root 用户,普通用户需要再在自己的环境下操作一次。下同。

根据条件使用

启动服务

# sysrc dbus_enable="YES"
# sysrc lightdm_enable="YES"

设置中文显示

.xinitrc 或者 .profile 中添加以下内容(但要在最前面才正常启用) export LANG=zh_CN.UTF-8

可选配置

输入法

请检查自己的 shell 是不是 shbashzsh 其中之一。

# echo $0

如果是以上三个 SHELL 之一,请继续,如果不是请参考第五章第一节:

# pkg install zh-fcitx zh-fcitx-configtool fcitx-qt5 fcitx-m17n zh-fcitx-libpinyin

配置文件:

# ee ~/.xinitrc

在该文件中添加以下内容:

export XMODIFIERS="@im=fcitx"
export XIM_PROGRAM="fcitx"
export GTK_IM_MODULE="fcitx"
fcitx &

全局菜单(可选)

# pkg install xfce4-appmenu-plugin appmenu-gtk-module appmenu-registrar
$ xfconf-query -c xsettings -p /Gtk/ShellShowsMenubar -n -t bool -s true
$ xfconf-query -c xsettings -p /Gtk/ShellShowsAppmenu -n -t bool -s true
$ xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"

故障排除

xfce 普通用户关机按钮灰色解决方案

# chown -R polkitd /usr/local/etc/polkit-1

即可解决 xfce4 普通用户关机按钮灰色的问题

FreeBSD 的 xfce 终端动态标题不显示问题

tcsh 配置:

home 目录创建 .tcshrc,写入以下配置

alias h history 25 alias j jobs -l alias la ls -aF alias lf ls -FA alias ll ls -lAF setenv EDITOR vi setenv PAGER less switch ($TERM) case "xterm*": set prompt="%{033]0;[]%~007%}%#" set filec set history = 1000 set savehist = (1000 merge) set autolist = ambiguous # Use history to aid expansion set autoexpand set autorehash breaksw default: set prompt="%#" breaksw endsw

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

静谧幽蓝

暂无简介

文章
评论
27 人气
更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文