lemurs/README.md

184 lines
6.2 KiB
Markdown
Raw Normal View History

2023-02-17 13:49:32 +00:00
<p align="center">
<!-- Icon by SVGRepo under CC0. Notice at the end of the file -->
<img src="./assets/text-icon.svg" height="200px" alt="Lemur Icon by SVGRepo" />
</p>
2021-12-28 21:56:14 +00:00
2023-02-17 13:49:32 +00:00
Lemurs provides a *Terminal User Interface* (TUI) for a [Display/Login
Managers](https://wiki.archlinux.org/title/Display_manager) in Rust for most
2023-03-03 19:06:55 +00:00
GNU/Linux and BSD distributions. It can work both *with or without SystemD*.
Lemurs works on most Unix systems including Linux, FreeBSD and NetBSD.
2021-12-31 18:48:24 +00:00
2023-02-17 13:49:32 +00:00
## Goal
2021-12-28 21:56:14 +00:00
2023-02-17 13:49:32 +00:00
This project creates a small, robust and yet customizable Login Manager which
can serve as the front-end to your TTY, X11 or Wayland sessions. Lemurs uses
2023-03-03 19:06:55 +00:00
[_Pluggable Authentication Modules_][pam] (PAM) as its method of authentication.
2021-12-28 22:18:22 +00:00
2023-02-17 13:49:32 +00:00
## Screenshot
2021-12-28 22:18:22 +00:00
2023-03-03 19:27:18 +00:00
![Cover image](./assets/cover.png)
2021-12-28 22:18:22 +00:00
## Installation
2023-02-17 13:49:32 +00:00
[![Packaging status](https://repology.org/badge/vertical-allrepos/lemurs.svg)](https://repology.org/project/lemurs/versions)
2023-03-03 19:06:55 +00:00
Installation follows three steps.
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
2023-03-03 19:06:55 +00:00
1. Compile the codebase
2. Copy all files to correct positions
3. Enable `init` process to run `lemurs`
### Arch Linux
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
Lemurs can be installed from the [AUR](https://aur.archlinux.org). This will
2023-03-03 19:06:55 +00:00
build the package on your local machine.
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
```bash
paru -S lemurs-git # paru can be replaced by any other AUR helper
2022-12-05 18:37:10 +00:00
# Not needed if do don't have a window manager yet
2023-02-17 13:49:32 +00:00
sudo systemctl disable display-manager.service
2022-12-05 18:37:10 +00:00
sudo systemctl enable lemurs.service
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
```
### Compiling from source
2021-12-31 19:02:53 +00:00
The `install.sh` script can be used to compile and setup the display manager on
your Unix machine. This will perform multiple steps:
Next version (#42) * Add maximum width option to input fields (#41) * Add maximum width option to input fields * Format input field code * Fix crash when no graphical environment is specified (#43) * Catch errors in shutdown and reboot scripts (#45) * Set PWD upon logging in (#48) * Set PWD upon logging in * Fix formatting * Load the /etc/lemurs/config.toml file (#49) * Load the /etc/lemurs/config.toml file * Formatting config.rs * Load the /etc/lemurs/config.toml file * Isolate and improve environment variables (#53) Add the XDG environment variables and isolate the setting of environment variables to their own module. The TTY is now also settable from the `config.toml`. * Add an option to remember the username from the last login (#55) * Add option to remember the username in /var/cache * Formatting * Remove mouse capture (#56) * Improve install script (#58) * Change configuration to extend default configuration (#57) * Change configuration to extend default configuration * Formatting * Remove test workflow * Massively cleanup, small improvements and improve the logging (#60) - Log path moved from `/tmp/lemurs.log` to `/var/log/lemurs.log` - Add the `--no-log` flag - Move the preview log file from `out.log` to `lemurs.log` - Handle tty switching errors - Change name config section `wm_selector` to `environment_switcher` - Change the pam service used from `login` to `system-login` - Separate all authentication and environment starting logic from the UI logic - Properly handle X starting errors - Create an event handling thread so that status messages can now be displayed while processing * Properly set groups when logging in with X (#72) * Fix installation file * Remove creation of Xauthority file * Dynamically wait for X to start * Add feature(set_groups) * Change back to 'login' auth * Update Cargo.lock * Update README.md file * Version bump * Remove unused code * Remove unwraps * Update Cargo.lock * Fix shared state and InputField * Fix input box * Clippy warnings * Make waiting dependent on time instead of loop count
2022-07-30 17:41:41 +00:00
1. Build the project in release mode (requires Rust's _cargo_)
2021-12-31 19:02:53 +00:00
2. Setup the `/etc/lemurs` folder which contains some of the configuration and
necessary files such as your selection of window managers.
3. Disables the previous Display Manager
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
4. Copies over the _systemd_ service and enables it.
2021-12-31 19:05:45 +00:00
2021-12-31 19:13:23 +00:00
Although you might first want to set up some window managers (see
[Usage](#Usage)), upon rebooting you should now see Lemurs.
## Usage
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
After installation you can add your environments by creating runnable scripts.
For your Xorg put your [xinitrc](https://wiki.archlinux.org/title/Xinit) scripts
in the `/etc/lemurs/wms` directory. For Wayland, put a script that starts your
compositor in the `/etc/lemurs/wayland` directory. For both cases, the name of
the runnable script file is the name that is shown in the environment switcher
within lemurs. Multiple Xorg and Wayland environments can exist at the same time.
### Example 1: BSPWM
For the [bspwm](https://github.com/baskerville/bspwm) window manager, you might
2021-12-31 19:13:23 +00:00
add the script `/etc/lemurs/wms/bspwm`.
```bash
#! /bin/sh
sxhkd &
exec bspwm
```
Remember to make this script runnable. This is done with the `chmod +x
/etc/lemurs/wms/bspwm` command.
2022-07-30 17:45:24 +00:00
Upon rebooting your new `bspwm` should show up within Lemurs.
2021-12-31 19:13:23 +00:00
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
### Example 2: Sway
For the [sway](https://swaywm.org/) compositor and window manager, you might
add the script `/etc/lemurs/wayland/sway`. Ensure that you have sway installed
and added yourself to the `seat` group.
```bash
#! /bin/sh
exec sway
```
Remember to make this script runnable. This is done with the `chmod +x
/etc/lemurs/wayland/sway` command.
Upon rebooting your new `sway` should show up within Lemurs.
2022-01-05 20:07:36 +00:00
## Configuration
2022-01-05 18:58:43 +00:00
Many parts for the UI can be configured with the `/etc/lemurs/config.toml`
Next version (#42) * Add maximum width option to input fields (#41) * Add maximum width option to input fields * Format input field code * Fix crash when no graphical environment is specified (#43) * Catch errors in shutdown and reboot scripts (#45) * Set PWD upon logging in (#48) * Set PWD upon logging in * Fix formatting * Load the /etc/lemurs/config.toml file (#49) * Load the /etc/lemurs/config.toml file * Formatting config.rs * Load the /etc/lemurs/config.toml file * Isolate and improve environment variables (#53) Add the XDG environment variables and isolate the setting of environment variables to their own module. The TTY is now also settable from the `config.toml`. * Add an option to remember the username from the last login (#55) * Add option to remember the username in /var/cache * Formatting * Remove mouse capture (#56) * Improve install script (#58) * Change configuration to extend default configuration (#57) * Change configuration to extend default configuration * Formatting * Remove test workflow * Massively cleanup, small improvements and improve the logging (#60) - Log path moved from `/tmp/lemurs.log` to `/var/log/lemurs.log` - Add the `--no-log` flag - Move the preview log file from `out.log` to `lemurs.log` - Handle tty switching errors - Change name config section `wm_selector` to `environment_switcher` - Change the pam service used from `login` to `system-login` - Separate all authentication and environment starting logic from the UI logic - Properly handle X starting errors - Create an event handling thread so that status messages can now be displayed while processing * Properly set groups when logging in with X (#72) * Fix installation file * Remove creation of Xauthority file * Dynamically wait for X to start * Add feature(set_groups) * Change back to 'login' auth * Update Cargo.lock * Update README.md file * Version bump * Remove unused code * Remove unwraps * Update Cargo.lock * Fix shared state and InputField * Fix input box * Clippy warnings * Make waiting dependent on time instead of loop count
2022-07-30 17:41:41 +00:00
file. This file contains all the options and explanations of their purpose.
2022-01-05 18:58:43 +00:00
The flag `--config <CONFIG FIlE>` can be used to select another configuration
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
file instead. An example configuration can be found in the `extra` folder in
this repository.
2021-12-31 19:05:45 +00:00
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
## Preview & Debugging
Next version (#42) * Add maximum width option to input fields (#41) * Add maximum width option to input fields * Format input field code * Fix crash when no graphical environment is specified (#43) * Catch errors in shutdown and reboot scripts (#45) * Set PWD upon logging in (#48) * Set PWD upon logging in * Fix formatting * Load the /etc/lemurs/config.toml file (#49) * Load the /etc/lemurs/config.toml file * Formatting config.rs * Load the /etc/lemurs/config.toml file * Isolate and improve environment variables (#53) Add the XDG environment variables and isolate the setting of environment variables to their own module. The TTY is now also settable from the `config.toml`. * Add an option to remember the username from the last login (#55) * Add option to remember the username in /var/cache * Formatting * Remove mouse capture (#56) * Improve install script (#58) * Change configuration to extend default configuration (#57) * Change configuration to extend default configuration * Formatting * Remove test workflow * Massively cleanup, small improvements and improve the logging (#60) - Log path moved from `/tmp/lemurs.log` to `/var/log/lemurs.log` - Add the `--no-log` flag - Move the preview log file from `out.log` to `lemurs.log` - Handle tty switching errors - Change name config section `wm_selector` to `environment_switcher` - Change the pam service used from `login` to `system-login` - Separate all authentication and environment starting logic from the UI logic - Properly handle X starting errors - Create an event handling thread so that status messages can now be displayed while processing * Properly set groups when logging in with X (#72) * Fix installation file * Remove creation of Xauthority file * Dynamically wait for X to start * Add feature(set_groups) * Change back to 'login' auth * Update Cargo.lock * Update README.md file * Version bump * Remove unused code * Remove unwraps * Update Cargo.lock * Fix shared state and InputField * Fix input box * Clippy warnings * Make waiting dependent on time instead of loop count
2022-07-30 17:41:41 +00:00
Lemurs logs a lot of information of it running to a logging file. This is
located by default at `/var/log/lemurs.log`, but can be turned of by running
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
with the `--no-log` flag.
Next version (#42) * Add maximum width option to input fields (#41) * Add maximum width option to input fields * Format input field code * Fix crash when no graphical environment is specified (#43) * Catch errors in shutdown and reboot scripts (#45) * Set PWD upon logging in (#48) * Set PWD upon logging in * Fix formatting * Load the /etc/lemurs/config.toml file (#49) * Load the /etc/lemurs/config.toml file * Formatting config.rs * Load the /etc/lemurs/config.toml file * Isolate and improve environment variables (#53) Add the XDG environment variables and isolate the setting of environment variables to their own module. The TTY is now also settable from the `config.toml`. * Add an option to remember the username from the last login (#55) * Add option to remember the username in /var/cache * Formatting * Remove mouse capture (#56) * Improve install script (#58) * Change configuration to extend default configuration (#57) * Change configuration to extend default configuration * Formatting * Remove test workflow * Massively cleanup, small improvements and improve the logging (#60) - Log path moved from `/tmp/lemurs.log` to `/var/log/lemurs.log` - Add the `--no-log` flag - Move the preview log file from `out.log` to `lemurs.log` - Handle tty switching errors - Change name config section `wm_selector` to `environment_switcher` - Change the pam service used from `login` to `system-login` - Separate all authentication and environment starting logic from the UI logic - Properly handle X starting errors - Create an event handling thread so that status messages can now be displayed while processing * Properly set groups when logging in with X (#72) * Fix installation file * Remove creation of Xauthority file * Dynamically wait for X to start * Add feature(set_groups) * Change back to 'login' auth * Update Cargo.lock * Update README.md file * Version bump * Remove unused code * Remove unwraps * Update Cargo.lock * Fix shared state and InputField * Fix input box * Clippy warnings * Make waiting dependent on time instead of loop count
2022-07-30 17:41:41 +00:00
If you want to test your configuration file you can also run `lemurs
--preview`. This will run a preview instance of your configuration. This will
automatically create a `lemurs.log` in the working directory.
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
## File Structure
Below is overview of the source files in this project and a short description of
each of them and their use. This can be used by people who want to contribute or
want to tweak details for their own installation.
```
|- src: Rust Source Code
2023-03-03 19:06:55 +00:00
| |- main.rs
| |- chvt.rs: UNIX calls to change of TTY
| |- cli.rs: CLI argument parsing
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
| |- config.rs: Configuration file format and options
2023-03-03 19:06:55 +00:00
| |- env_container.rs: Handles resetting and resetting the environment variables
| |- info_caching.rs: Handling cached username and session environment
| |- auth: Interaction with PAM modules and UTMPX
| | |- mod.rs
| | |- pam.rs
| | |- utmpx.rs
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
| |- post_login: All logic after authentication
2023-03-03 19:06:55 +00:00
| | |- mod.rs
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
| | |- env_variables.rs: General environment variables settings
| | |- x.rs: Logic concerning Xorg
| |- ui: TUI code
| | |- mod.rs: UI calling logic, separated over 2 threads
2023-03-03 19:06:55 +00:00
| | |- chunks.rs: Division of the TUI screen
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
| | |- input_field.rs: TUI input field used for username and password
| | |- power_menu.rs: Shutdown and Reboot options UI
| | |- status_message.rs: UI for error and information messages
| | |- switcher.rs: UI for environment switcher
|- extra: Configuration and extra files needed
| |- config.toml: The default configuration file
| |- xsetup.sh: Script used to setup a Xorg session
| |- lemurs.service: The systemd service used to start at boot
2023-03-03 19:06:55 +00:00
| |- lemurs.pam: PAM service configuration
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
```
2022-12-02 18:26:14 +00:00
## Platforms
Tested on
- ArchLinux (Vanilla, ArcoLinux)
- VoidLinux
- Ubuntu (make sure to install `build-essential` and `libpam-dev`)
## MSRV Policy
2023-03-03 19:06:55 +00:00
Lemurs has a _Minimum Supported Rust Version_ policy of _N - 2_. This means that
we only use Rust languages features that have been in Rust as of 2 releases.
2022-12-02 18:26:14 +00:00
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
## License
2023-02-17 13:49:32 +00:00
The icon used at the top of the repository is not a logo and taken as an icon
from the [SVGRepo](https://www.svgrepo.com/svg/252871/lemur). It is marked
under CC0 and therefore freely distributable and amendable under a new
license.
Next version (#76) * Caching Post-Login Environment (#75) * Add a configuration option for focus behaviour (#74) * Add a configuration option for focus behaviour * Rust fmt * Add caching for post login environment * Fmt * Clippy * Fix the status message (#77) * Fix status message * Handle render unwraps * Add comment * FMT and Clippy * Switch arg parsing to clap-derive (#78) * Switch arg parsing to clap-derive * RustFmt Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Make nightly the default toolchain * Enable building with stable toolchain (#79) * Adjust code so that it builds with stable Rust * Move unsafety to only wrap the 'pre_exec' * Fix PERMERR by reordering to set{groups, gid, uid} * Remove +nightly from install script Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com> * Add command to show possible environments * Exclude non-executable environments * Add subcommand to view cached information * Add --tty CLI flag to override TTY configuration (#81) * Add TTY Shell environment (#82) Add TTY shell environment * Always display TTYSHELL if no wms are found (#83) * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * [FIX]: Show TTY Shell on dir misconfiguration (#89) * Wayland support (#84) * Get started on wayland support * Add AUR installation instructions (#87) * File overview in README (#88) Add file overview in README * Working Wayland * Improve the README to reflect changes * Version Bump and Document Dependencies * Change power control commands to systemd * Change cover image * Crop cover image * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * UTMPX Support (#90) * [FEATURE]: Add UTMPX support * RUSTFMT and add libc dependency * Clippy and include Cargo.lock Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-22 15:30:26 +00:00
The project is made available under the MIT and APACHE license. See the
`LICENSE-MIT` and `LICENSE-APACHE` files, respectively, for more information.
Next version (#42) * Add maximum width option to input fields (#41) * Add maximum width option to input fields * Format input field code * Fix crash when no graphical environment is specified (#43) * Catch errors in shutdown and reboot scripts (#45) * Set PWD upon logging in (#48) * Set PWD upon logging in * Fix formatting * Load the /etc/lemurs/config.toml file (#49) * Load the /etc/lemurs/config.toml file * Formatting config.rs * Load the /etc/lemurs/config.toml file * Isolate and improve environment variables (#53) Add the XDG environment variables and isolate the setting of environment variables to their own module. The TTY is now also settable from the `config.toml`. * Add an option to remember the username from the last login (#55) * Add option to remember the username in /var/cache * Formatting * Remove mouse capture (#56) * Improve install script (#58) * Change configuration to extend default configuration (#57) * Change configuration to extend default configuration * Formatting * Remove test workflow * Massively cleanup, small improvements and improve the logging (#60) - Log path moved from `/tmp/lemurs.log` to `/var/log/lemurs.log` - Add the `--no-log` flag - Move the preview log file from `out.log` to `lemurs.log` - Handle tty switching errors - Change name config section `wm_selector` to `environment_switcher` - Change the pam service used from `login` to `system-login` - Separate all authentication and environment starting logic from the UI logic - Properly handle X starting errors - Create an event handling thread so that status messages can now be displayed while processing * Properly set groups when logging in with X (#72) * Fix installation file * Remove creation of Xauthority file * Dynamically wait for X to start * Add feature(set_groups) * Change back to 'login' auth * Update Cargo.lock * Update README.md file * Version bump * Remove unused code * Remove unwraps * Update Cargo.lock * Fix shared state and InputField * Fix input box * Clippy warnings * Make waiting dependent on time instead of loop count
2022-07-30 17:41:41 +00:00
## Contributions
Please report any bugs and possible improvements as an issue within this
repository. Pull requests are also welcome.
2023-02-17 13:49:32 +00:00
[pam]: https://en.wikipedia.org/wiki/Pluggable_authentication_module