# 6.8.Wayland 登录管理器

虽然有多种登录管理器，并且它们正在慢慢迁移到 Wayland 上，其中一个选择是 [x11/ly](https://cgit.freebsd.org/ports/tree/x11/ly/) 文本用户界面（TUI）管理器。`ly` 的配置最简单，能够通过在系统初始化时展示登录窗口来启动 Sway、Wayfire 等。要安装 `ly`，可以执行以下命令：

```sh
# pkg install ly
```

系统会提供一些配置提示，导入步骤是将以下内容添加到 `/etc/gettytab` 文件中：

```ini
Ly:\
  :lo=/usr/local/bin/ly:\
  :al=root:
```

然后修改 `/etc/ttys` 文件中的 `ttyv1` 行，修改为以下内容：

```ini
ttyv1 "/usr/libexec/getty Ly" xterm onifexists secure
```

重启系统后，登录界面应该会出现。要配置特定的设置，如语言，可以编辑 `/usr/local/etc/ly/config.ini` 文件。至少，这个文件中应该指定之前在 `/etc/ttys` 文件中设置的 tty。

> **注意**
>
> 如果将 `ttyv0` 设置为登录终端，可能需要按下 <kbd>alt</kbd> 和 <kbd>F1</kbd> 键，才能正确看到登录窗口。

当登录窗口出现时，使用左右箭头键可以切换不同的支持的窗口管理器。


---

# 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://handbook.bsdcn.org/di-6-zhang-freebsd-zhong-de-wayland/6.8.-wayland-deng-lu-guan-li-qi.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.
