~kennylevinsen/greetd-docs

a54b094ab4fd521cd629f100bfa7d94bead2fbd6 — Tom Lebreux 15 days ago 115bbb0 master
Document SELinux error
1 files changed, 10 insertions(+), 0 deletions(-)

M index.md
M index.md => index.md +10 -0
@@ 210,6 210,16 @@ The default greetd configuration uses `agreety` (which looks just like `agetty` 

You can change the configuration as mentioned in the steps above to make `agreety` start another login environment of your choice (e.g. `sway`), or use a different greeter altogether.

## greetd fails with `unable to exec: Sys(EACCES)`

This is due to SELinux policies. You will need to run the following commands to
unblock `greetd`:

```sh
semanage fcontext -a -ff -t xdm_exec_t /usr/bin/greetd
restorecon /usr/bin/greetd
```

## greetd fails with `unable to lock pages: Sys(ENOMEM)`

greetd *must* be started as root, as it must perform a few privileged actions. This error is usually the result of attempting to run greetd as another user, which will fail immediately as `mlockall(3)` is attempted at startup (done to block greetd miniscule memory allocations from being swapped to disk). Later PAM operations also expect to be run by root/CAP_SYS_ADMIN as well.