You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
4.7 KiB

# Web Greeter for LightDM
4 years ago
A modern, visually appealing greeter for LightDM, that allows to create web based themes with HTML, CSS and JavaScript.
This is a try to update the [Antergos web-greeter](https://github.com/Antergos/web-greeter), following what they left.
9 years ago
4 years ago
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.
9 years ago
Checkout [nody-greeter][nody-greeter], a greeter made in **Node.js** with **Electron**! (Actually, faster than Web Greeter)
## [See Live Demo][live_demo]
Gruvbox and Dracula themes!
4 years ago
## Features
- Create themes with HTML, CSS and JavaScript!
- Should work everywhere.
- JavaScript error handling, allowing to load the default theme.
- Themes could be simple, or very complex.
- Battery and brightness control.
4 years ago
- Tab completion for zsh and bash.
4 years ago
4 years ago
## Dependencies
3 years ago
| | arch | ubuntu | fedora | openSUSE |
4 years ago
|-----------------------|---------------|----------------------|---------------------|-----------------------|
|**liblightdm-gobject** |lightdm |liblightdm-gobject-dev|lightdm-gobject-devel|liblightdm-gobject-1-0 |
|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject |
|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 |
|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine |
9 years ago
4 years ago
### PIP
- PyGObject
- PyQt5
- PyQtWebEngine
- ruamel.yaml
- python-xlib
- [cx_freeze](https://cx-freeze.readthedocs.io/en/latest/installation.html) (and patchelf) (Optional)
Install PIP dependencies with:
4 years ago
```sh
pip install -r requirements.txt
4 years ago
```
8 years ago
> ***NOTE*** Be sure to install pip libraries as root too, or use a venv to install these dependencies
4 years ago
## Download & Install
9 years ago
```sh
4 years ago
git clone https://github.com/JezerM/web-greeter.git
cd web-greeter
sudo pip install -r requirements.txt
sudo make install
9 years ago
```
Whis will build and install **web-greeter** in a zippy way, which compresses the python code as a zip and uses it as a binary. Either `sudo make install_freeze` to build and install with cx_freeze. The zippy method depends on the actual python interpreter and its libraries, so you could have problems when updating python or removing any dependency, while the cx_freeze method tries to fix this "problem".
See [latest release][releases].
4 years ago
## Theme JavaScript API
[Antergos][Antergos] documentation is no longer available, although it is accesible through [Web Archive][WebArchive]. Current and updated documentation is available at [gh-pages][gh-pages].
4 years ago
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.
## Enable features
### Brightness control
To control the brightness inside the greeter, I recommend to use [acpilight][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`
4 years ago
If you don't want to or don't have a compatible device, disable it inside `/etc/lightdm/web-greeter.yml` (disabled by default)
### Battery status
`acpi` is the only tool you need (and a battery).
4 years ago
You can disable it inside `/etc/lightdm/web-greeter.yml` (disabled by default)
9 years ago
## 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.
4 years ago
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
4 years ago
web-greeter --debug
```
> ***Note:*** Do not use `lightdm --test-mode` as it is not supported.
9 years ago
[antergos]: https://github.com/Antergos "Antergos"
[nody-greeter]: https://github.com/JezerM/nody-greeter "Nody Greeter"
[cx_freeze]: https://github.com/marcelotduarte/cx_Freeze "cx_Freeze"
[acpilight]: https://gitlab.com/wavexx/acpilight "acpilight"
[WebArchive]: https://web.archive.org/web/20190524032923/https://doclets.io/Antergos/web-greeter/stable "Web Archive"
4 years ago
[gh-pages]: https://jezerm.github.io/web-greeter/ "API Documentation"
[live_demo]: https://jezerm.github.io/web-greeter-themes/ "Live Demo"
[releases]: https://github.com/JezerM/web-greeter/releases "Releases"