chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

commit 35bacfd4f107246517c8a998dab07bf7051fb2cc
parent b8f77a6a07c541a6621a5ea152fdff7d591c6629
Author: torter <koubbamohamedrayan@gmail.com>
Date:   Sun, 25 Oct 2026 11:07:27 -0400

gnome and astro sign in with gdm again: gnome locks the screen only under gdm. the installer sets up autologin for the edition's own sign-in screen

Diffstat:
Mbuild.sh | 2+-
Meditions/gnome/edition | 2++
Aeditions/gnome/overlay/etc/dinit.d/display-manager | 12++++++++++++
Aeditions/gnome/overlay/usr/lib/dinit/gdm | 4++++
Meditions/gnome/packages | 1-
Moverlay/usr/lib/live-installer/installer.py | 14++++++++++----
6 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/build.sh b/build.sh @@ -114,7 +114,7 @@ LOGIN=$(edval login); LOGIN=${LOGIN:-sddm} # what an installed system starts: the live one, unless the edition says otherwise (gnome and kde: x11 live, where # the installer is at home, wayland once installed). the installer reads it for autologin INSTALLED=$(edval installed-session); INSTALLED=${INSTALLED:-$SESSION} -mkdir -p "$ROOT/etc/chamesle"; echo "$INSTALLED" > "$ROOT/etc/chamesle/session" +mkdir -p "$ROOT/etc/chamesle"; echo "$INSTALLED" > "$ROOT/etc/chamesle/session"; echo "$LOGIN" > "$ROOT/etc/chamesle/login" if [ "$LOGIN" = sddm ]; then mkdir -p "$ROOT/etc/sddm.conf.d" printf '# the live session only (the installer removes this file)\n[Autologin]\nUser=live\nSession=%s.desktop\n' "$SESSION" \ diff --git a/editions/gnome/edition b/editions/gnome/edition @@ -1,5 +1,7 @@ name=GNOME # the live session is on X11, where the installer is at home. installed systems start on wayland, gnome's default session=gnome-xorg +# gdm, not sddm: gnome locks the screen only under its own sign-in screen +login=gdm installed-session=gnome tour=Press the Windows key, or click Activities top left, to see your windows and search for apps. The dock at the bottom holds your favourites. diff --git a/editions/gnome/overlay/etc/dinit.d/display-manager b/editions/gnome/overlay/etc/dinit.d/display-manager @@ -0,0 +1,12 @@ +# gdm (the gnome edition's, the others use sddm): gnome locks the screen only under gdm +type = process +command = /usr/lib/dinit/gdm +depends-on = dbus +depends-on = elogind +waits-for = polkitd +waits-for = plymouth-quit +waits-for = udev-trigger +waits-for = network +restart = true +smooth-recovery = true +logfile = /var/log/gdm-dinit.log diff --git a/editions/gnome/overlay/usr/lib/dinit/gdm b/editions/gnome/overlay/usr/lib/dinit/gdm @@ -0,0 +1,4 @@ +#!/bin/sh +# gdm wants its run directory made for it +mkdir -m0711 -p /run/gdm && chown root:gdm /run/gdm +exec /usr/bin/gdm diff --git a/editions/gnome/packages b/editions/gnome/packages @@ -5,6 +5,5 @@ nautilus sushi file-roller gnome-console gnome-text-editor gnome-calculator gnom gnome-disk-utility gnome-tweaks loupe evince celluloid gvfs xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-user-dirs-gtk adwaita-icon-theme adwaita-fonts gnome-themes-extra -# not to sign in (sddm does that), but gnome-shell needs its Gdm typelib, which void ships only in gdm gdm chamesle-gnome diff --git a/overlay/usr/lib/live-installer/installer.py b/overlay/usr/lib/live-installer/installer.py @@ -45,7 +45,16 @@ class InstallerEngine: subprocess.run(["chroot", "/target", "chpasswd", "-c", "SHA512"], input="%s:%s\n" % (self.setup.username, self.setup.password1), text=True) - if self.setup.autologin and os.path.exists("/target/usr/bin/sddm"): + # the sign-in screen the edition uses (the build left it in /etc/chamesle/login): sddm is installed everywhere, + # but gnome signs in with gdm + try: + login = open("/target/etc/chamesle/login").read().strip() + except OSError: + login = "" + if self.setup.autologin and login == "gdm" and os.path.exists("/target/etc/gdm/custom.conf"): + os.system("sed -i 's/^\\[daemon\\]$/&\\nAutomaticLoginEnable=True\\nAutomaticLogin=%s/' /target/etc/gdm/custom.conf" + % self.setup.username) + elif self.setup.autologin and os.path.exists("/target/usr/bin/sddm"): # sddm needs the session too: the edition's default, which the build left in /etc/chamesle/session try: session = open("/target/etc/chamesle/session").read().strip() @@ -56,9 +65,6 @@ class InstallerEngine: os.makedirs("/target/etc/sddm.conf.d", exist_ok=True) with open("/target/etc/sddm.conf.d/80-autologin.conf", "w") as f: f.write("[Autologin]\nUser=%s\nSession=%s\n" % (self.setup.username, session)) - elif self.setup.autologin and os.path.exists("/target/etc/gdm/custom.conf"): - os.system("sed -i 's/^\\[daemon\\]$/&\\nAutomaticLoginEnable=True\\nAutomaticLogin=%s/' /target/etc/gdm/custom.conf" - % self.setup.username) elif self.setup.autologin: os.makedirs("/target/etc/lightdm/lightdm.conf.d", exist_ok=True) with open("/target/etc/lightdm/lightdm.conf.d/80-autologin.conf", "w") as f: