You can access the man-pages `man web-greeter` for some documentation and explanation. Also, you can
explore the provided [themes](./themes) for real use cases.
Additionally, you can install the TypeScript types definitions inside your theme with npm:
```sh
npm install nody-greeter-types
```
## Additional features
### Brightness control
`acpi` is the only tool needed to control the brightness, besides a compatible device.
This functionality is based on [acpilight][acpilight] replacement for `xbacklight`.
udev rules are needed to be applied before using it, check [acpilight rules][acpilight_rules].
Then, lightdm will need to be allowed to change backlight values, to do so add lightdm user
to the **video** group: `sudo usermod -a -G video lightdm`
Enable it inside `/etc/lightdm/web-greeter.yml`
### Battery status
`acpi` and `acpi_listen` are the only tools you need (and a battery).
This functionality is based on ["bat" widget][bat_widget] from ["lain" awesome-wm library][lain].
You can enable it inside `/etc/lightdm/web-greeter.yml`
## Debugging
You can run the greeter from within your desktop session if you add the following line to the desktop
file for your session located in `/usr/share/xsessions/`: `X-LightDM-Allow-Greeter=true`.
You have to log out and log back in after adding that line. Then you can run the greeter
from command line.
Themes can be opened with a debug console if you set `debug_mode` as `true`
inside `/etc/lightdm/web-greeter.yml`. Or, you could run the `web-greeter` with
the parameter `--debug`. I recommend to use the last one, as it is easier and handy.
```sh
web-greeter --debug
```
Check `web-greeter --help` for more commands.
> ***Note:*** Do not use `lightdm --test-mode` as it is not supported.
## Troubleshooting
Before setting **web-greeter** as your LightDM Greeter, you should make sure it does work also with LightDM:
- Run **web-greeter** as root with `--no-sandbox` flag ("Unable to determine socket to daemon" and "XLib" related errors are expected)
- Run `lightdm --test-mode`. Although it's not supported, if it does work then it could help to debug lightdm.
### LightDM crashes and tries to recover over and over again
LightDM does this when the greeter crashes, so it could mean **web-greeter** was not installed
correctly, or some dependencies were updated/removed after a distro update.
### Import errors
If you see something like this: `ImportError: libQt5WebEngineCore.so.5: undefined symbol: _ZNSt12out_of_rangeC1EPKc, version Qt_5`, check out this [StackOverflow response](https://stackoverflow.com/a/68811630).
With some PyQt5 import errors like `ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'`, check out this [GitHub response](https://github.com/spyder-ide/spyder/issues/8952#issuecomment-499418456).
web-greeter related import errors:
-`AttributeError: module 'globals' has no attribute 'greeter'` means some exception happened inside the Browser constructor, maybe related to LightDM or PyQt5.
-`ModuleNotFoundError: No module named 'resources'` could mean `path/to/web-greeter-clone/web-greeter/resources.py` was not compiled with pyrcc5 in the build/install methods.