Commit 5025619a authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch 'docs/musings' into 'master'

Add musings

See merge request moser/poolpay!20
parents 19de7351 cd6097f9
Loading
Loading
Loading
Loading

docs/musings/README.md

0 → 100644
+5 −0
Original line number Diff line number Diff line
# Musings about PoolPay

This folder contains additional documentation in the form of musings of the author about design choices, why something was done or not done in a particular way, and how something could be done as well.

You usually don't need to read this.
+13 −0
Original line number Diff line number Diff line
# Autologin

This is where the Terminal autologin configuration is stored:

```bash
sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
```

This is how we can run a Python script instead of a shell (make sure to include a Shebang in that file, i.e. `#!/usr/bin/env python3`):

```bash
sudo chsh -s /home/app/somescript.py app
```
+25 −0
Original line number Diff line number Diff line
# How to auto-start an application?

## Don't boot to X Server / Wayland

I currently want to avoid having to start an X Server or Wayland, mostly because:

* I am afraid they will introduce additional ways to escape my application.
* They will likely add additional complexity I don't need.

This means we will likely even use **Raspberry Pi OS Lite**, because if we don't need an X Server or a desktop environment, why install it?

## Autostart via autologin

1. Create extra user (without `sudo` etc.) for login
2. Configure auto login for that user (there should be official documentation on that)
3. Change shell to the Python app
   * For 2. and 3., see [`autologin.md`](autologin.md) for details
4. Build a terminal-based Python app (e.g. with Textualize)

## Autostart via systemd unit

Currently preferred:

1. Create systemd unit for app, enable it
2. On boot, this will start the app, which will take over the Framebuffer and display its UI