sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

README.md (3030B)


      1 # patina-greeter
      2 
      3 Sector F Linux's login screen, with the first-run setup in it. A Patina egui app that greetd runs
      4 inside a kiosk compositor (`cage -s -- patina-greeter`), in this repository and not in
      5 patina-desktop, because it is what logs in, not part of the desktop session. Why, and how it fits
      6 together: [ADR-0012](../docs/adr/0012-a-login-manager-of-our-own-greetd-and-a-patina-greeter.md) and
      7 [ADR-0013](../docs/adr/0013-the-greeter-is-a-patina-app-of-our-own.md).
      8 
      9 Two modes, one program:
     10 
     11 - **Login**, when an account exists: the time and date, the people who can log in (a row of round
     12   avatars when there is more than one), a password pill, a spinner while it is checked, a shake
     13   when it is wrong, and Restart and Shut down.
     14 - **First-run setup**, when none does: Welcome to Sector F Linux, then full name, user name (which
     15   follows the full name until you type your own), password and confirmation. It makes the account
     16   and logs it straight in.
     17 
     18 It looks like the Patina desktop's lock screen on purpose (`patina-desktop/lock/src/ui.rs`): the
     19 same clock, avatar and pill, and the same way of handling a password, which is never put in an egui
     20 `TextEdit` (its undo history would keep copies) but read from the key events, shown as dots, and
     21 zeroed when cleared or sent. There is no window frame, title bar or menu: Patina's frame is for
     22 windows with menus, and this is a full-screen login. The skin is the desktop's, Everforest Dark.
     23 
     24 ## Status
     25 
     26 The screens, their logic and the tests are done, on a **mock backend**. The real one is next:
     27 greetd's socket (`greetd_ipc`) for the login, AccountsService over D-Bus (`zbus`) for the first
     28 account, which the polkit rule in `../linux/prototype/` allows only while nobody can log in, and
     29 logind for Restart and Shut down. Until then, without `PATINA_GREETER_MOCK` it says so and exits.
     30 
     31 ## Try it
     32 
     33 ```sh
     34 make run          # the login, in a window; the password is "sectorf"
     35 make run-setup    # the first-run setup
     36 ```
     37 
     38 On the mock, accounts are alice and bob. Environment variables (also in `--help`):
     39 `PATINA_GREETER_MOCK=login|setup`, `PATINA_GREETER_SIZE=1280x800` (a window, not full screen),
     40 `PATINA_GREETER_DEMO=` to fill a screen in, `PATINA_GREETER_SCREENSHOT=file.png`, `PATINA_SKIN`.
     41 
     42 | Key | Does |
     43 |---|---|
     44 | Enter | logs in; in the setup, next field, and on the last one makes the account |
     45 | Tab, Shift+Tab | next and previous field (setup) |
     46 | Left, Right | another user (login) |
     47 | Backspace, Ctrl+Backspace, Ctrl+U, Esc | delete a character, or clear the field |
     48 
     49 Editing is at the end of the text only, which is all a name or a password needs.
     50 
     51 ## Build
     52 
     53 ```sh
     54 make          # the targets
     55 make check    # the tests and clippy -D warnings
     56 make build    # a release binary
     57 ```
     58 
     59 Needs the same libraries as the desktop (Wayland, xkbcommon). For the image it is built in the
     60 Fedora builder, so it links what the image has.
     61 
     62 ## Licence
     63 
     64 BSD-3-Clause, as the Patina desktop's pieces are (set in `Cargo.toml`; this repository has no
     65 `LICENSE` file yet).