https://github.com/coastalwhite/lemurs
A customizable TUI display/login manager written in Rust π
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
-
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
-
βDOI references
-
βAcademic publication links
-
βCommitters with academic emails
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Repository
A customizable TUI display/login manager written in Rust π
Basic Info
Statistics
- Stars: 996
- Watchers: 11
- Forks: 42
- Open Issues: 67
- Releases: 6
Topics
Metadata Files
README.md
Lemurs is a Terminal User Interface (TUI) Display/Login Managers written in Rust that works on most GNU/Linux and BSD distributions. It can work both with or without SystemD.
Goal
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 Pluggable Authentication Modules (PAM) as its method of authentication.
Screenshot

Installation
Installation follows three steps.
- Compile the codebase
- Copy all files to correct positions
- Enable
initprocess to runlemurs
Arch Linux
Lemurs can be installed from the extra repository.
```bash sudo pacman -S lemurs
Not needed if you don't have a window manager yet
sudo systemctl disable display-manager.service
sudo systemctl enable lemurs.service ```
Alternatively, lemurs-git is available in the AUR.
Compiling from source
The install.sh script can be used to compile and setup the display manager on
your Unix machine. This will perform multiple steps:
- Build the project in release mode (requires Rust's cargo)
- Setup the
/etc/lemursfolder which contains some of the configuration and necessary files such as your selection of window managers. - Disables the previous Display Manager
- Copies over the systemd service and enables it.
Although you might first want to set up some window managers (see Usage), upon rebooting you should now see Lemurs.
Usage
After installation you can add your environments by creating runnable scripts.
For your Xorg put your xinitrc 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 window manager, you might
add the script /etc/lemurs/wms/bspwm.
```bash
! /bin/sh
sxhkd & exec bspwm ```
Remember to make this script runnable. This is done with the sudo chmod 755
/etc/lemurs/wms/bspwm command.
Upon rebooting your new bspwm should show up within Lemurs.
Example 2: Sway
For the sway 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 sudo chmod 755
/etc/lemurs/wayland/sway command.
Upon rebooting your new sway should show up within Lemurs.
Configuration
Configuration is done through a TOML file. By default, Lemurs searches for a
/etc/lemurs/config.toml file, but an alternative location can be specified
using the --config <path/to/config.toml> flag. The configuration type can
contain any subset of the available options. All the options and explanations
as to what they do can be found in the
extra/config.toml file. This file also serves as the
default configuration.
Additionally, there is the possibility of variables in the configuration file.
By default, Lemurs searches for a /etc/lemurs/variables.toml file, but an
alternative location can be specified using the --variables
<path/to/variables.toml. The variables.toml file may contain key-value pairs
which can be referenced from within the main config.toml file.
Below shows an example of how the variables.toml and config.toml file
interact.
```toml
variables.toml
replacementchar = "+" showpwtitle = true passwordtitle = "Password :)" title_color = "white"
config.toml
[passwordfield] contentreplacementcharacter = "$replacementchar"
[passwordfield.style] showtitle = "$showpwtitle" title = "Wow a $passwordtitle" titlecolor = "$title_color" ```
This will be interpreted as:
```toml [passwordfield] contentreplacement_character = "+"
[passwordfield.style] showtitle = true title = "Wow a Password :)" title_color = "white" ```
Preview & Debugging
Lemurs logs a lot of information of it running to a logging file. There are 3 log files.
/var/log/lemurs.log: This is the main log file that contains information about the control flow and is the first place you should look./var/log/lemurs.client.log: This is thestdoutandstderrof your environment. This can help you debug your scripts in the/etc/lemurs/wmsor/etc/lemurs/waylandfolder./var/log/lemurs.xorg.log: This is thestdoutandstderrof the X server. This is only used when you run a X11 based environment.
You can disable logging with the --no-log flag. This flag can be adding into
your service manager script if you want to disable logging globally.
If you want to test the UI generated by 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.
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
| |- main.rs
| |- chvt.rs: UNIX calls to change of TTY
| |- cli.rs: CLI argument parsing
| |- config.rs: Configuration file format and options
| |- 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
| |- post_login: All logic after authentication
| | |- mod.rs
| | |- env_variables.rs: General environment variables settings
| | |- x.rs: Logic concerning Xorg
| |- ui: TUI code
| | |- mod.rs: UI calling logic, separated over 2 threads
| | |- chunks.rs: Division of the TUI screen
| | |- 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
| |- lemurs.pam: PAM service configuration
Shell Keybindings
Lemurs has support for some basic shell keybindings.
- Ctrl + A: Go to the beginning of the focused input field
- Ctrl + E: Go to the end of the focused input field
- Ctrl + L: Clear the focused input field
- Ctrl + U: Clear input field text before the cursor
- Ctrl + K: Clear input field text after the cursor
- Ctrl + D: Same as Delete
- Ctrl + H: Same as Backspace
- Ctrl + B: Same as Left
- Ctrl + F: Same as Right
- Ctrl + P: Same as Up
- Ctrl + N: Same as Down
Platforms
Tested on
- ArchLinux (Vanilla, ArcoLinux)
- VoidLinux
- Ubuntu (make sure to install
build-essentialandlibpam-dev) - OpenSUSE (make sure to install
pamandpam-devel)
MSRV Policy
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.
License
The icon used at the top of the repository is not a logo and taken as an icon from the SVGRepo. It is marked under CC0 and therefore freely distributable and amendable under a new license.
The project is made available under the MIT and APACHE license. See the
LICENSE-MIT and LICENSE-APACHE files, respectively, for more information.
Contributions
Please report any bugs and possible improvements as an issue within this repository. Pull requests are also welcome.
Owner
- Name: Gijs Burghoorn
- Login: coastalwhite
- Kind: user
- Location: Netherlands
- Company: Polars
- Website: gburghoorn.com
- Repositories: 103
- Profile: https://github.com/coastalwhite
Rusty Hardware and Security Guy π¦
GitHub Events
Total
- Create event: 8
- Release event: 1
- Issues event: 11
- Watch event: 242
- Delete event: 6
- Issue comment event: 37
- Push event: 9
- Pull request event: 4
- Fork event: 7
Last Year
- Create event: 8
- Release event: 1
- Issues event: 11
- Watch event: 242
- Delete event: 6
- Issue comment event: 37
- Push event: 9
- Pull request event: 4
- Fork event: 7
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gijs Burghoorn | g****n@g****m | 186 |
| Daniyil Glushko | d****x@p****m | 8 |
| funnyboy-roks | f****s@g****m | 3 |
| Luke Else | m****l@l****k | 2 |
| Felix Buehler | a****t@b****s | 2 |
| bits0rcerer | 2****r | 1 |
| atropos1789 | 1****9 | 1 |
| StΓ©phane Campinas | s****s@g****m | 1 |
| Robin Candau | r****u@p****m | 1 |
| Jahan Rashidi | 5****n | 1 |
| Henning Leth | l****g@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 77
- Total pull requests: 41
- Average time to close issues: 3 months
- Average time to close pull requests: 10 days
- Total issue authors: 56
- Total pull request authors: 15
- Average comments per issue: 3.44
- Average comments per pull request: 0.71
- Merged pull requests: 27
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 14
- Pull requests: 8
- Average time to close issues: 3 months
- Average time to close pull requests: 4 minutes
- Issue authors: 13
- Pull request authors: 4
- Average comments per issue: 0.5
- Average comments per pull request: 0.13
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- coastalwhite (12)
- tranzystorekk (4)
- xVermillionx (3)
- LennyLizowzskiy (2)
- mxaddict (2)
- kkard2 (2)
- i7sreact (2)
- VinceGuidry (1)
- thcrt (1)
- kardwen (1)
- ErenKyojin (1)
- zajca (1)
- Snakehater (1)
- 2tefan (1)
- axcutul (1)
Pull Request Authors
- coastalwhite (21)
- derekthesnake (4)
- h-leth (4)
- scampi (2)
- funnyboy-roks (2)
- Stunkymonkey (2)
- ImNotJahan (2)
- Freyert (2)
- labre (2)
- Polidoro-root (2)
- Antiz96 (2)
- danma3x (2)
- luke-else (1)
- bits0rcerer (1)
- atropos1789 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
proxy.golang.org: github.com/coastalwhite/lemurs
- Documentation: https://pkg.go.dev/github.com/coastalwhite/lemurs#section-documentation
- License: apache-2.0
-
Latest release: v0.4.0
published about 1 year ago
Rankings
Dependencies
- atty 0.2.14
- autocfg 1.0.1
- bitflags 1.3.2
- cassowary 0.3.0
- cc 1.0.72
- cfg-if 0.1.10
- cfg-if 1.0.0
- chrono 0.4.19
- chvt 0.2.0
- clap 3.0.0
- clap_derive 3.0.0
- crossterm 0.20.0
- crossterm 0.22.1
- crossterm_winapi 0.8.0
- crossterm_winapi 0.9.0
- fern 0.5.9
- getrandom 0.2.3
- hashbrown 0.11.2
- heck 0.3.3
- hermit-abi 0.1.19
- hex 0.4.3
- indexmap 1.7.0
- instant 0.1.12
- lazy_static 1.4.0
- libc 0.1.12
- libc 0.2.112
- lock_api 0.4.5
- log 0.4.14
- memchr 2.4.1
- memoffset 0.6.5
- mio 0.7.14
- miow 0.3.7
- nix 0.15.0
- nix 0.23.1
- ntapi 0.3.6
- num-integer 0.1.44
- num-traits 0.2.14
- numtoa 0.1.0
- os_str_bytes 6.0.0
- pam 0.7.0
- pam-sys 0.5.6
- parking_lot 0.11.2
- parking_lot_core 0.8.5
- pgs-files 0.0.7
- ppv-lite86 0.2.15
- proc-macro-error 1.0.4
- proc-macro-error-attr 1.0.4
- proc-macro2 1.0.36
- quote 1.0.14
- rand 0.8.4
- rand_chacha 0.3.1
- rand_core 0.6.3
- rand_hc 0.3.1
- redox_syscall 0.2.10
- redox_termios 0.1.2
- scopeguard 1.1.0
- serde 1.0.133
- serde_derive 1.0.133
- signal-hook 0.3.13
- signal-hook-mio 0.2.1
- signal-hook-registry 1.4.0
- smallvec 1.7.0
- strsim 0.10.0
- syn 1.0.84
- termcolor 1.1.2
- termion 1.5.6
- textwrap 0.14.2
- time 0.1.44
- toml 0.5.8
- tui 0.16.0
- unicode-segmentation 1.8.0
- unicode-width 0.1.9
- unicode-xid 0.2.2
- users 0.8.1
- version_check 0.9.4
- void 1.0.2
- wasi 0.10.0+wasi-snapshot-preview1
- winapi 0.3.9
- winapi-i686-pc-windows-gnu 0.4.0
- winapi-util 0.1.5
- winapi-x86_64-pc-windows-gnu 0.4.0
- chrono 0.4
- chvt 0.2.0
- clap 3.0.0
- crossterm 0.22
- fern 0.5.2
- hex 0.4.3
- log 0.4.0
- nix 0.23.1
- pam 0.7.0
- pgs-files 0.0.7
- rand 0.8.4
- serde 1.0
- toml 0.5
- tui 0.16.0
- unicode-width 0.1
- actions-rs/cargo v1 composite
- actions-rs/toolchain v1 composite
- actions/checkout v2 composite
- actions/checkout v3 composite