aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md77
1 files changed, 23 insertions, 54 deletions
diff --git a/README.md b/README.md
index 88d5c1d..4967fbf 100644
--- a/README.md
+++ b/README.md
@@ -1,75 +1,44 @@
-# seatd (tentative)
+# seatd and libseat
-Seat management daemon. Work in progress, name still up for debate.
+A minimal seat management daemon, and a universal seat management library. Alpha.
-## Goals for seatd
+## What is seat management?
-1. Provide a simple daemon that manages the user seat - nothing more, nothing less.
-2. Support all sorts of setups - with and without systemd, BSD, ...
-3. Provide a seat management library that can use seatd, (e)logind or direct file access to remove complexity from shell implementations.
+Seat management takes care of mediating access to shared devices (graphics, input), without requiring the applications needing access to be root.
-## Non-goals for seatd
+## What's in the box?
-1. Backlight control
-2. Dock detection
-3. Power button handling
-4. ... Anything that is not related to mediating access to seat devices.
+### seatd
-## Why ...
+A seat management deamon, that does everything it needs to do. Nothing more, nothing less. Depends only on libc.
-### ... seatd, the daemon?
+### libseat
-There is no good implementation of modern seat management. We're well past the time of running our user shells as root/suid to grab input devices, but there is little in the way of alternatives.
+A seat management library allowing applications to use whatever seat management is available.
-There is logind of course, but that only works for systemd-based Linux distributions (see "What about elogind?"), and "simple" is definitely not within the set of adjectives that can be used to describe logind. For those in the dark, [take a glance at its API](https://www.freedesktop.org/wiki/Software/systemd/logind/).
+Supports:
+- seatd
+- (e)logind
+- embedded seatd for standalone operation
-ConsoleKit2 unfortunately appears abandoned.
+Each backend can be compile-time included and is runtime auto-detected or manually selected with the `LIBSEAT_BACKEND` environment variable.
-#### What about elogind?
+Which backend is in use is transparent to the application, providing a simple common interface.
-systemd is not written with isolated modules in mind - that is, logind and others have internal hard dependencies on other systemd components, such as "PID1" and journald - and fighting against core upstream design decisions is a lot of work, which repeats every time one syncs with upstream.
+## Why not (e)logind?
-Why spend all that work isolating logind and keeping up with upstream when *we can do better*?
+systemd-logind is not portable, and being part of the systemd project, it cannot be used in an environment not based on systemd. Furthermore, "simple" is definitely not within the set of adjectives that can be used to describe logind. For those in the dark, [take a glance at its API](https://www.freedesktop.org/wiki/Software/systemd/logind/). Plus, competition is healthy.
-### ... seatd, the library?
+elogind tries to isolate systemd-logind form systemd through brute-force. This requires actively fighting against upstream design decisions for deep integration, and the efforts must be repeated every time one syncs with upstream. And even after all this work, one is left with nothing but a hackjob.
-[In order to not be part of the problem](https://xkcd.com/927/). If seatd ended up being yet another session backend to implement, it wouldn't really help much, as user shells like [sway](https://github.com/swaywm/sway) would still have to handle logind, and possibly direct session management.
+Why spend time isolating logind and keeping up with upstream when we could instead create something better with less work?
-Instead, to make the lives of these shells easier, a simple library would be the only thing they need to interact with. Things like direct session management (for when neither seatd nor logind is available) could also be kept in, and maintained, in one place rather than having duplicated code.
+## Why does libseat support (e)logind?
-## seatd API (tentative)
+[In order to not be part of the problem](https://xkcd.com/927/). We will not displace systemd-logind anytime soon, so for user shells like [sway](https://github.com/swaywm/sway), seatd joins the ranks of logind and direct session management for things they need to support.
-seatd will operate over unix sockets.
-
-### Methods
-
-- open_seat(seat_listener) -> seat_handle
-- seat_open_device(seat_handle, device_handle) -> file_handle
-- seat_close_device(seat_handle, file_handle) -> file_handle
-- seat_ack_disable(seat_handle)
-- close_seat(seat_handle)
-
-### Events
-
-- seat_disable: The seat is being disabled. The seat holder must suspend all seat usage and ack the disable when done.
-- seat_resume: The seat is being enabled. The seat holder is free to resume all seat usage.
-- seat_device_added(device_handle): A new device has been added to the seat.
-- seat_device_removed(device_handle): A device has been removed from the seat.
-
-## Backlight control, button monitoring, ...
-
-These features do not belong in seatd. However, side-projects might be created to handle this.
-
-Power button/lid switch/... management can be done in a separate daemon with no interaction with seatd whatsoever. As there is no reason for it to reside in seatd, it *must not* reside in seatd.
-
-The same goes for backlight control. Now, one might wish to restrict backlight access to the currently enabled seat, which might require some thought. This will preferably still be done with no dependency on setad.
-
-Regardless of what is done, simplicity of seatd is top priority, and a significant complexity increase just to permit e.g. restricted backlight control will not be accepted.
-
-## Where's the code?
-
-The rough design should be hashed out first, before code is written that ends up cementing the design in place.
+Instead of giving user shell developers more work, libseat aims to make supporting seatd less work than what they're currently implementing. This is done by taking care of all the seat management needs with multiple backends, providing not only seatd support, but replacing the existing logind and direct seat management implementations.
## I want more
-Go to #kennylevinsen @ chat.freenode.net to discuss.
+Go to #kennylevinsen @ chat.freenode.net to discuss, or use [~kennylevinsen/public-inbox@lists.sr.ht](https://lists.sr.ht/~kennylevinsen/public-inbox).