# 8.6 LXQt

LXQt 是一款基于 Qt 的轻量级桌面环境，专为注重简洁、速度和直观界面的用户设计。与大多数桌面环境不同，LXQt 在性能较弱的计算机上同样运行良好。

## 安装 LXQt 桌面环境

* 通过 pkg 安装：

```sh
# pkg install xorg sddm lxqt gvfs wqy-fonts xdg-user-dirs
```

* 或使用 Ports 安装：

```sh
# cd /usr/ports/x11/xorg/ && make install clean
# cd /usr/ports/x11-wm/lxqt/ && make install clean
# cd /usr/ports/x11-fonts/wqy/ && make install clean
# cd /usr/ports/x11/sddm/ && make install clean
# cd /usr/ports/filesystems/gvfs/ && make install clean
# cd /usr/ports/devel/xdg-user-dirs/ && make install clean
```

### 软件包说明

| 包名              | 功能说明                                                                          |
| --------------- | ----------------------------------------------------------------------------- |
| `xorg`          | X 窗口系统                                                                        |
| `sddm`          | 显示管理器                                                                         |
| `lxqt`          | LXQt 桌面环境                                                                     |
| `gvfs`          | GNOME 虚拟文件系统，LXQt 依赖此组件以打开 Computer 和 Network，否则会提示 `Operation not supported` |
| `wqy-fonts`     | 文泉驿中文字体                                                                       |
| `xdg-user-dirs` | 管理用户目录，如“桌面”、“下载”等，并处理目录名称的本地化                                                |

## 服务管理

设置 D-Bus 服务开机自启：

```sh
# service dbus enable
```

设置 SDDM 显示管理器开机自启：

```sh
# service sddm enable
```

## 挂载 proc 文件系统

编辑 **/etc/fstab** 文件，加入下行：

```sh
proc	/proc	procfs	rw	0	0
```

将 `procfs` 文件系统以读写模式挂载到 **/proc**。

## 通过 startx 启动 LXQt

将启动命令写入 **\~/.xinitrc** 文件，即可启动 LXQt 桌面环境：

```sh
$ echo "exec ck-launch-session startlxqt" > ~/.xinitrc
```

应以实际登录的账户身份执行上述命令。

## 设置中文环境

### 为 SDDM 显示管理器设置中文环境

```sh
# sysrc sddm_lang="zh_CN"
```

![FreeBSD 安装 LXQt](/files/3xxN0L0oBtsLF6qJmx9e)

![FreeBSD 安装 LXQt](/files/I0w2isgOLr96UJOQ4WSJ)

![FreeBSD 安装 LXQt](/files/nSaWhCkFvgE2b09VufOG)

### 为 LXQt 桌面环境设置中文环境

进入 LXQt 后，点击菜单 → “Preferences” → “LXQt Settings” → “Locale” → “Region”，在下拉菜单中选择中文。

![FreeBSD 安装 LXQt](/files/7RTjAakKmignKklfMtwI)

![FreeBSD 安装 LXQt](/files/mfs8EJStcq6IJFZThIMQ)

## 故障排除与未竟事宜

### 桌面图标不显示

需事先安装所需图标主题。然后：菜单 → “Preferences” → “LXQt Settings” → “Appearance” → “Icons Theme”，选择已安装的图标主题，点击“Apply”后重新登录。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/di-8-zhang-zhuo-mian-huan-jing/di-8.6-jie-lxqt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
