> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/di-13-zhang-zhuo-mian-huan-jing/di-13.6-jie-lxqt.md).

# 13.6 LXQt

LXQt 是一款基于 Qt 的轻量级桌面环境，由 LXDE-Qt 与 Razor-qt 两个项目合并而成（2013 年 7 月宣布合并，2014 年 5 月发布首个版本 0.7.0），专为注重简洁、速度和直观界面的用户设计。与大多数桌面环境不同，LXQt 在性能较弱的计算机上同样运行良好。

## 安装 LXQt 桌面环境

* 通过 pkg 安装：

```sh
# pkg install xorg 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/filesystems/gvfs/ && make install clean
# cd /usr/ports/devel/xdg-user-dirs/ && make install clean
```

登录管理器可考虑使用 LightDM。

### 软件包说明

| 包名              | 功能说明                                                                    |
| --------------- | ----------------------------------------------------------------------- |
| `xorg`          | X 窗口系统                                                                  |
| `lxqt`          | LXQt 桌面环境                                                               |
| `gvfs`          | GNOME 虚拟文件系统，LXQt 需要此组件才能打开“计算机”和“网络”位置，否则会提示 `Operation not supported` |
| `wqy-fonts`     | 文泉驿中文字体                                                                 |
| `xdg-user-dirs` | 管理用户目录，如“桌面”“下载”等，并处理目录名称的本地化                                           |

## 服务管理

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

```sh
# service dbus enable
```

## 挂载 proc 文件系统

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

```ini
proc	/proc	procfs	rw	0	0
```

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

## 通过 startx 启动 LXQt

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

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

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

## 桌面图片

![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”后重新登录。

## 附录：LXDE 桌面环境

> **注意**
>
> LXDE 已进入维护模式，开发基本停滞，主要开发者已转向 LXQt。LXDE 最后主要版本为 0.10 系列（约 2021 年发布），此后仅有极少量维护性更新，缺乏新功能开发。建议新用户优先选用 LXQt。

LXDE 是一款轻量级桌面环境，专注于资源利用效率与简洁的交互体验，在低配置硬件平台上表现优异。然而，随着 LXQt 的迁移，LXDE 获得的维护逐渐减少。

### 安装 LXDE 桌面环境

* 使用 pkg 安装：

```sh
# pkg install lxde-meta xorg wqy-fonts xdg-user-dirs
```

* 或使用 Ports 安装：

```sh
# cd /usr/ports/x11/lxde-meta/ && make install clean
# cd /usr/ports/x11/xorg/ && make install clean
# cd /usr/ports/x11-fonts/wqy/ && make install clean
# cd /usr/ports/devel/xdg-user-dirs/ && make install clean
```

登录管理器可考虑使用 LightDM。

#### 软件包说明

| 包名              | 作用说明               |
| --------------- | ------------------ |
| `xorg`          | X 窗口系统             |
| `lxde-meta`     | LXDE 桌面环境的元包       |
| `wqy-fonts`     | 文泉驿中文字体            |
| `xdg-user-dirs` | 管理用户目录，如“桌面”、“下载”等 |

### startx

编辑 **\~/.xinitrc** 文件，添加以下内容，以便通过 startx 命令启动 LXDE 桌面环境：

```sh
exec startlxde
```

### 启动项

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

```sh
# service dbus enable
```

### 挂载 proc 文件系统

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

```ini
proc           /proc       procfs  rw  0   0
```

### 桌面欣赏

![FreeBSD 安装 LXDE](/files/sLRpBhHJKK9l1zp5wg9A)

![FreeBSD 安装 LXDE](/files/uf24XiUacWmpASfCq4QC)

![FreeBSD 安装 LXDE](/files/gLQmgkspGTvCjjcBfnA7)

### 参考文献

* FreeBSD Project. Install & Configure a Desktop Environment: LXDE\[EB/OL]. \[2026-03-25]. <https://wiki.freebsd.org/LXDE>. LXDE 桌面环境安装与配置指南。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/di-13-zhang-zhuo-mian-huan-jing/di-13.6-jie-lxqt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
