VM_DESKTOP=gnome for vminstall, GNOME prototype findings
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-10-14 13:40:16 +02:00
1 parent 1155c362dd
commit 382c9ae4c0
3 files changed
+29 -10

No files matched your search

+13 -5
View File
@@ -25,11 +25,11 @@ plus pacman hook, relogin by restarting gdm).
`CI=1 VM_DESKTOP=gnome VM_STEAMIFY=skip VM_DIR=~/vms/gnome-vm VM_SSH_KEY=~/vms/steamify-vm/vmkey REPO=<steamify-cachyos> scripts/vminstall.sh --iso ~/vms/iso-dl/steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (PATH with ~/vms/shim, `sg kvm -c`). Plain CachyOS GNOME, Steamify applied by hand afterwards.
## Steps
1. [ ] GNOME VM installed (install running, log ~/vms/gnome-install.out); snapshots clean/ssh-ready.
2. [ ] Run `steamify.sh --defaults --options gaming` in the VM (repo on 9p /mnt); fix what breaks (kconfig, packages, shellcheck).
3. [ ] Check: custom.conf, AccountsService, hook, sudoers, our tools in place.
4. [ ] Reboot: GDM autologs into the gamescope session (loginctl session desktop/type; gamescope may not render in the VM, a running session is enough).
5. [ ] `steamos-session-select desktop` -> GNOME session; Return to Gaming Mode shortcut -> gamescope again; reboot persistence; `boot` option.
1. [x] GNOME VM installed (~/vms/gnome-vm; the headless installer ignores "desktop":"gnome", so vminstall-post.sh installs cachyos-gnome-settings + gnome + gdm).
2. [x] Run `steamify.sh --defaults --options gaming` in the VM (repo on 9p /mnt); fix what breaks (kconfig, packages, shellcheck).
3. [x] Check: custom.conf, AccountsService, hook, sudoers, our tools in place.
4. [x] (gamescope itself dies in the VM: Vulkan/DRM scanout errors, also without GNOME; GDM did start it) Reboot: GDM autologs into the gamescope session (loginctl session desktop/type; gamescope may not render in the VM, a running session is enough).
5. [~] (gamescope->GNOME and GNOME->gamescope verified with a stand-in gamescope session (Exec=sleep infinity in /usr/share/wayland-sessions/gamescope-session.desktop, original kept as .real); reboot persistence, `boot` option and the shortcut click not yet) `steamos-session-select desktop` -> GNOME session; Return to Gaming Mode shortcut -> gamescope again; reboot persistence; `boot` option.
6. [ ] Turn off: everything restored (custom.conf backup, original tools).
7. [ ] KDE regression: existing suites still pass on the KDE VM.
8. [ ] Commit dev-repo changes (VM_DESKTOP) to main; product branch stays a prototype, no release without the user.
@@ -39,3 +39,11 @@ plus pacman hook, relogin by restarting gdm).
- GNOME theme based on the Vapor Plasma theme (user idea: colours, wallpaper, icons; shell/GTK parts new). Single user mode and the other KDE-only parts (powerdevil in steam-machine, first-login, update notifier) need GNOME versions or stay hidden.
- Decide: keep replacing CachyOS's two files, or get GDM support upstream into gamescope-session-cachyos.
- Real hardware: GDM restart behaviour, Steam's Switch to Desktop button.
## Findings so far (2026-10-14)
- GDM logs in by itself only when it starts. A switch = set the session in AccountsService, `loginctl terminate-user`, `systemctl restart gdm` (patches/steamify-gdm-relogin.sh, run through sudo from inside the session, as a transient unit because ending the user kills the caller). Without ending the user first, GNOME refuses: "A graphical session is already running!". Waiting for the user manager to exit only keeps GDM's login screen up (10 s): no wait = about 1.4 s to GNOME.
- Both `Session=` and `XSession=` are written to AccountsService; GDM picked the right session. (Which one is needed is untested: could drop one.)
- cachyos-gamescope-autologin.service resets the session to gamescope when a desktop session ends (Deck behaviour), so after GNOME the next login is gamescope again.
- A failed gamescope session (VM) lands on GDM's login screen; SDDM relogin loops instead. Real hardware untested.
- Menu: theme and single user mode hidden on GNOME.
- ssh into the VM dies at every switch (terminate-user): reconnect.
+8 -5
View File
@@ -14,7 +14,7 @@
# VM_INSTALL_MEM (RAM of the live installer VM only; default VM_MEM, else run.sh's 8G),
# VM_CACHE (host dir for the packages, default ~/vms/pkg-cache; empty = none),
# VM_STEAMIFY (a Steamify ISO also runs steamify-install: the Steamify page's ids,
# empty = defaults, skip = plain CachyOS), VM_BOOTLOADER (limine; or systemd-boot, grub), VM_TIMEZONE (the host's), VM_HOST_IP (the host as the guest sees it,
# empty = defaults, skip = plain CachyOS), VM_DESKTOP (kde; or gnome: GDM, autologin into GNOME), VM_BOOTLOADER (limine; or systemd-boot, grub), VM_TIMEZONE (the host's), VM_HOST_IP (the host as the guest sees it,
# 10.0.2.2 with QEMU's user networking).
# The VM's user and key are recorded in $VM_DIR (vm-user, ssh-key) for the
# other scripts. Never touches your existing SSH keys or ~/.ssh/known_hosts.
@@ -134,11 +134,11 @@ port="$(python3 -c 'import socket; s=socket.socket(); s.bind(("127.0.0.1",0)); p
sed -e "s/@PORT@/$port/" -e "s/@HOST_IP@/$host_ip/" "$repo/share/vminstall-live.sh" > "$www/vminstall-live.sh"
cp "$repo/share/vminstall-post.sh" "$www/"
{
printf 'VM_USER=%q\nVM_HOSTNAME=%q\nVM_PUBKEY=%q\nDEVICE=/dev/vda\nVM_STEAMIFY=%q\n' "$VM_USER" "$hostname" "$pubkey" "${VM_STEAMIFY:-}"
printf 'VM_USER=%q\nVM_HOSTNAME=%q\nVM_PUBKEY=%q\nDEVICE=/dev/vda\nVM_STEAMIFY=%q\nVM_DESKTOP=%q\n' "$VM_USER" "$hostname" "$pubkey" "${VM_STEAMIFY:-}" "${VM_DESKTOP:-kde}"
} > "$www/vminstall.env"
python3 - "$www/settings.json" "$VM_USER" "$password" "$timezone" "$hostname" "${VM_BOOTLOADER:-limine}" << 'PY'
python3 - "$www/settings.json" "$VM_USER" "$password" "$timezone" "$hostname" "${VM_BOOTLOADER:-limine}" "${VM_DESKTOP:-kde}" << 'PY'
import json, sys
out, user, pw, tz, host, bootloader = sys.argv[1:]
out, user, pw, tz, host, bootloader, desktop = sys.argv[1:]
json.dump({
"install_type": "simple", "headless_mode": True,
"device": "/dev/vda", "fs_name": "btrfs", "subvolumes": "default",
@@ -148,7 +148,7 @@ json.dump({
],
"hostname": host, "locale": "en_US.UTF-8", "xkbmap": "us", "timezone": tz,
"user_name": user, "user_pass": pw, "user_shell": "/bin/fish", "root_pass": pw,
"kernel": "linux-cachyos linux-cachyos-lts", "desktop": "kde", "bootloader": bootloader,
"kernel": "linux-cachyos linux-cachyos-lts", "desktop": desktop, "bootloader": bootloader,
}, open(out, "w"), indent=2)
PY
python3 "$here/vminstall-server.py" "$www" "$port" &
@@ -208,6 +208,9 @@ if [[ -f /etc/sddm.conf.d/10-gamescope-autologin.conf ]]; then
# Steamify's gaming mode (gamescope, no Plasma, and it doesn't render in the VM): the login manager has to be up.
for _ in $(seq 60); do systemctl is-active --quiet display-manager && break; sleep 3; done
systemctl is-active --quiet display-manager || { echo "The login manager didn't start." >&2; exit 1; }
elif pacman -Q gdm >/dev/null 2>&1; then
for _ in $(seq 60); do pgrep -u "$USER" -x gnome-shell >/dev/null && break; sleep 3; done
pgrep -u "$USER" -x gnome-shell >/dev/null || { echo "GNOME didn't start." >&2; exit 1; }
else
for _ in $(seq 60); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done
pgrep -u "$USER" -x plasmashell >/dev/null || { echo "Plasma didn't start." >&2; exit 1; }
+8
View File
@@ -28,6 +28,14 @@ chmod 440 /etc/sudoers.d/99-test-vm
# doesn't need a desktop.
if [[ -f /etc/sddm.conf.d/10-gamescope-autologin.conf ]]; then
echo "Steamify's gaming-mode login (SDDM) kept."
elif [[ "${VM_DESKTOP:-kde}" == gnome ]]; then
# GNOME install (VM_DESKTOP=gnome): GDM logs in by itself, like the Plasma one below.
# The headless installer only lays down the base for "gnome": the desktop is installed here, the set CachyOS's installer picks.
pacman -Q gdm >/dev/null 2>&1 || pacman -S --needed --noconfirm cachyos-gnome-settings gnome gdm ||
pacman -S --needed --noconfirm gnome gdm
systemctl enable gdm.service
mkdir -p /etc/gdm
printf '[daemon]\nAutomaticLoginEnable=True\nAutomaticLogin=%s\n' "$VM_USER" > /etc/gdm/custom.conf
else
pacman -Q plasma-login-manager >/dev/null 2>&1 || pacman -S --needed --noconfirm plasma-login-manager
systemctl disable sddm.service 2>/dev/null || true