# Web Greeter for LightDM

This is a try to update the [Antergos web-greeter](https://github.com/Antergos/web-greeter), following what they left, so all the credits should go with them.

As this is based on the [master release](https://github.com/Antergos/web-greeter/tree/master), which does some API changes, actual themes would need to do changes to work correctly.

### Dependencies

|                                                  | arch                       | ubuntu                 | fedora                | openSUSE               |
| ------------------------------------------------ | -------------------------- | ---------------------- | --------------------- | ---------------------- |
| [**whither**](https://github.com/JezerM/whither) | \*install it from source\* |                        |                       |                        |
| **liblightdm-gobject**                           | lightdm                    | liblightdm-gobject-dev | lightdm-gobject-devel | liblightdm-gobject-1-0 |
| **pygobject**                                    | python-gobject             | python3-gi             | pygobject3            | python3-gobject        |

> ***NOTE*** Be sure to have [whither](https://github.com/JezerM/whither) installed from this source

#### PIP

You can install the above dependencies with pip. **liblightdm-gobject** should be accesible if you have installed lightdm.

```bash
pip install PyGObject
```

### Download & Install

```bash
git clone https://github.com/JezerM/web-greeter.git
cd web-greeter
sudo make install
```

### Theme Javascript API

[Antergos](https://github.com/Antergos) documentation is no longer available, although it is accesible through [Web Archive](https://web.archive.org/web/20190524032923/https://doclets.io/Antergos/web-greeter/stable). Actual documentation is available in [GitBook](https://amyuki4.gitbook.io/web-greeter/).

You can access the man-pages `man web-greeter` for some documentation and explanation. Also, you can explore the provided [themes](https://github.com/JezerM/web-greeter/tree/master/themes) for real use cases.

### Enable features

#### Brightness control

To control the brightness inside the greeter, I recommend to use [acpilight](https://gitlab.com/wavexx/acpilight) replacement for `xbacklight`.

udev rules are needed to be applied before using it. Then, lightdm will need to be allowed to change backlight values, to do so add lightdm user to **video** group: `sudo usermod -a -G video lightdm`

If you don't want to or don't have a compatible device, disable it inside `/etc/lightdm/web-greeter.yml`

#### Battery status

`acpi` is the only tool you need (and a battery).

You can disable 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.

```bash
web-greeter --debug
```

> ***Note:*** Do not use `lightdm --test-mode` as it is not supported.


---

# 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://amyuki4.gitbook.io/web-greeter/master.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.
