Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

Sessions start once the user's session bus exists (autologin raced it: no Secret Service or notifications for the whole session, gnome-keyring activated instead); gnome-keyring drop-in keeps only PKCS#11 so LordOS keeps org.freedesktop.secrets; BIOS boot black rectangle described as GRUB's loading screen

Federico Pereira34a0d3774ec7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d26584..43cae13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -197,6 +197,17 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
### Fixed
+- **A session started at boot could live without its keyring service and its notifications.** With
+ automatic login, `lord-sessiond` started the session as soon as `/run/user/<uid>` existed, a few
+ milliseconds before the user's service manager opened the session bus, so `lord-vault` (the Secret
+ Service) and the notification server for Linux apps never got on the bus. Apps then got nothing, or,
+ when an app had pulled in gnome-keyring, that one by D-Bus activation, with its own "Choose password
+ for new keyring" window. `lord-sessiond` now starts `user@<uid>` and waits for the bus socket (up to
+ 5 s) before starting the session. And when an app pulls in gnome-keyring, a drop-in shipped by the
+ lordos package (`gnome-keyring-daemon.service.d/lordos.conf`) keeps only its PKCS#11 component, so
+ LordOS's own keyring keeps the Secret Service. Tested on the VMware machine: after a reboot with
+ automatic login, `org.freedesktop.secrets` and `org.freedesktop.Notifications` belong to the LordOS
+ session, and Chrome asks through LordOS's own keyring prompt.
- **The Store ignored a repository written as `Architectures: amd64,arm64`.** apt accepts commas there
(Cursor's package writes it that way); LordOS's package engine split only on spaces, so it dropped
that source and never saw the app's updates. Both are accepted now.
@@ -303,10 +314,13 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
- **llama.cpp on a GPU is not tested on real hardware yet.** Its Vulkan backend is meant for AMD (Mesa
RADV), NVIDIA (the NVIDIA driver or NVK) and Intel GPUs and falls back to the CPU without one; only the
CPU path and the backend loading (software Vulkan) were checked.
-- **The live ISO's boot menu on legacy BIOS** shows a black rectangle in place of the menu until a key
- is pressed; the entries are there and the timeout boots the first one as usual. Seen on QEMU with
- SeaBIOS (standard VGA and virtio displays); 0.8.4's ISO does the same, and UEFI draws the menu at
- once. A hidden countdown widget in the theme did not change it.
+- **Legacy BIOS: a black rectangle between the boot menu and the splash.** The menu itself shows
+ normally; when its 5 s run out (or Enter is pressed), GRUB loads the kernel and the initrd (about
+ 100 MB) from the disc and shows its terminal area, painted black, inside the theme's background until
+ the kernel starts: a few seconds on BIOS, which reads the disc slowly, and barely visible on UEFI.
+ Seen on QEMU with SeaBIOS; 0.8.4's ISO does the same. Small test images with the same GRUB, theme and
+ `grub.cfg` but no 900 MB system image show the menu and no rectangle; a background image set in each
+ entry and a hidden countdown widget in the theme did not change it.
- **Searching "displays" in the search panel** opens the Help article on touchpads and touch screens before
Settings → Displays.
- **Settings → Displays:** in the arrangement, the name of a small display is cut without an ellipsis.
diff --git a/docs/PASSWORDS.md b/docs/PASSWORDS.md
index a012eee..8d66d3e 100644
--- a/docs/PASSWORDS.md
+++ b/docs/PASSWORDS.md
@@ -342,6 +342,12 @@ sandboxed `lord-vault` authenticates and serves on it.
- Items are entries of `login.lvault` with `x.ss = {attrs, ctype}`; non-UTF-8 secrets are stored
base64.
- If another service already owns the name (gnome-keyring, kwallet), LordOS does not take it.
+ Two things keep it LordOS's (0.8.5): `lord-sessiond` starts a session only once the user's session
+ bus exists (with automatic login it used to start a few milliseconds earlier, and `lord-vault` then
+ never got on the bus), and the lordos package ships
+ `/usr/lib/systemd/user/gnome-keyring-daemon.service.d/lordos.conf`, which starts gnome-keyring (when
+ an app pulls it in) with only its PKCS#11 component. Its D-Bus activation file runs only when
+ nobody owns the name.
- **Access control is the freedesktop one:** like gnome-keyring, any app of the session that can
reach the bus can read the unlocked collection. Isolated `.lpk` apps cannot open the bus socket.
- **Chromium:** current Chromium releases keep their saved logins in their own database and store
diff --git a/packaging/systemd/gnome-keyring-lordos.conf b/packaging/systemd/gnome-keyring-lordos.conf
new file mode 100644
index 0000000..d86f549
--- /dev/null
+++ b/packaging/systemd/gnome-keyring-lordos.conf
@@ -0,0 +1,8 @@
+# LordOS: the Secret Service (org.freedesktop.secrets) is LordOS's own keyring, lord-vault
+# (docs/PASSWORDS.md). gnome-keyring, when some app pulls it in, keeps only its PKCS#11 component
+# (certificates for NSS), so it never takes the name and never asks for a "Default Keyring" password
+# with its own prompter. Its D-Bus activation file only runs when nobody owns the name, and
+# lord-vault owns it for the whole session.
+[Service]
+ExecStart=
+ExecStart=/usr/bin/gnome-keyring-daemon --foreground --components=pkcs11 --control-directory=%t/keyring
diff --git a/server/src/remote/sess.c b/server/src/remote/sess.c
index 09418ab..7656afc 100644
--- a/server/src/remote/sess.c
+++ b/server/src/remote/sess.c
@@ -357,14 +357,22 @@ int sd_session_get(const struct passwd *pw, int w, int h) {
char rt[64];
snprintf(rt, sizeof rt, "/run/user/%u", (unsigned)pw->pw_uid);
struct stat st;
- if (stat(rt, &st)) {
- /* no logind session: the user's service manager creates /run/user/<uid>
- * (and starts its PipeWire) */
+ char bus[80];
+ snprintf(bus, sizeof bus, "%s/bus", rt);
+ if (stat(bus, &st)) {
+ /* no logind session, or one whose service manager is still starting (autologin at
+ * boot): /run/user/<uid> comes first, from user-runtime-dir@, and the session bus
+ * socket a moment later, from user@. A session started before the bus has no Secret
+ * Service and no notification server for its whole life (lord-vault and notifyd
+ * connect once), and the first app asking for org.freedesktop.secrets gets
+ * gnome-keyring by D-Bus activation when it is installed. "systemctl start" returns
+ * once the manager is up (its dbus.socket listening); then wait for the socket. */
char unit[64];
snprintf(unit, sizeof unit, "user@%u.service", (unsigned)pw->pw_uid);
const char *const a[] = { "/usr/bin/systemctl", "start", unit, NULL };
sd_run_wait(a);
- for (int i = 0; i < 50 && stat(rt, &st); i++) usleep(100000);
+ for (int i = 0; i < 50 && stat(bus, &st); i++) usleep(100000);
+ if (stat(bus, &st)) sd_log("no session bus at %s: the session starts without it", bus);
}
if (stat(rt, &st) || st.st_uid != pw->pw_uid) sd_log("no %s", rt);
else {
diff --git a/tools/iso/mkdeb.sh b/tools/iso/mkdeb.sh
index fdb1fbe..15b2068 100755
--- a/tools/iso/mkdeb.sh
+++ b/tools/iso/mkdeb.sh
@@ -34,6 +34,7 @@
# /etc/kernel/postinst.d/zz-lordos-reboot-required "restart required" after a kernel update
# /usr/lib/modules-load.d/lordos-drivetemp.conf SATA disk temperatures (drivetemp) at boot
# /usr/lib/systemd/system/smartmontools.service.d/lordos.conf Debian's smartd stays off
+# /usr/lib/systemd/user/gnome-keyring-daemon.service.d/lordos.conf gnome-keyring without the Secret Service
# /usr/share/chromium/extensions/lordos-video/ LordOS's own browser extension for smooth video without
# hardware decoding (Debian's chromium loads every folder there;
# docs/VIDEO.md). Its settings are written at login by the
@@ -152,6 +153,8 @@ install -D -m 644 tools/iso/rootfs/etc/modprobe.d/lordos-vmwgfx.conf "$PKG/etc/m
install -D -m 644 tools/iso/rootfs/etc/modules-load.d/lordos-drivetemp.conf "$PKG/usr/lib/modules-load.d/lordos-drivetemp.conf"
# Debian's smartd stays off: Disks and the Monitor read SMART on demand (docs/SYSTEM.md, "smartd")
install -D -m 644 packaging/systemd/smartmontools-lordos.conf "$PKG/usr/lib/systemd/system/smartmontools.service.d/lordos.conf"
+# gnome-keyring, if an app pulls it in, without its Secret Service: LordOS keeps that name (docs/PASSWORDS.md)
+install -D -m 644 packaging/systemd/gnome-keyring-lordos.conf "$PKG/usr/lib/systemd/user/gnome-keyring-daemon.service.d/lordos.conf"
# remote login (SSH) defaults, read only once openssh-server is installed (docs/REMOTE.md)
install -D -m 644 tools/iso/rootfs/etc/ssh/sshd_config.d/10-lordos.conf "$PKG/etc/ssh/sshd_config.d/10-lordos.conf"
# a process may only trace its own descendants: a restricted Linux app must not take over an