feat(desktop): ship a curated wallpaper collection
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
This commit is contained in:
parent
e98d4ed38e
commit
37d4f84601
12 changed files with 200 additions and 0 deletions
|
|
@ -5,6 +5,12 @@ this file is the curated, human-readable summary.
|
|||
|
||||
## Unreleased — Fast defaults with user-controlled source builds
|
||||
|
||||
- **Desktop wallpapers (2026-10-01).** Four original, offline 16:9 wallpapers
|
||||
now ship with the installer and live desktop: desert dusk, aurora lagoon,
|
||||
carved stone and misty lake. Installation seeds the current user's
|
||||
`Pictures/Wallpapers` folder and `/etc/skel` for future users without
|
||||
overwriting existing files. The live medium seeds the same folder.
|
||||
|
||||
- **Virtual machine guest integration (2026-10-01).** The installer now
|
||||
detects QEMU/KVM, VMware and VirtualBox, selects matching guest packages
|
||||
and Mesa video targets, and enables their applicable services. Mango gains
|
||||
|
|
|
|||
|
|
@ -3,6 +3,17 @@
|
|||
Rolling note between work sessions. **Update this file before you finish**, then
|
||||
commit it. It should be short and current; use `git log` for detail.
|
||||
|
||||
- **Wallpaper defaults (2026-10-01):** Four generated 1672 × 941 JPEGs live
|
||||
in `installer-rs/assets/wallpapers`. The installer embeds and seeds them for
|
||||
the installation user and future accounts without replacing custom files;
|
||||
the live build copies them into `/home/phoebus/Pictures/Wallpapers`.
|
||||
Provisioning and preservation tests plus live-build guards pass. The four
|
||||
images were also copied into the running QEMU playground's
|
||||
`~/Pictures/Wallpapers` and matched against repository SHA-256 hashes. The
|
||||
existing branded SVG remains the live installer background. `make doctor`
|
||||
reports 10 GiB free against its 20 GiB new-VM gate, so a fresh ISO/install
|
||||
has not yet been built with these assets.
|
||||
|
||||
- **VM guest defaults (2026-10-01):** The visible playground was gracefully
|
||||
restarted on its existing disposable qcow2 with `virtio-vga-gl` and GTK GL;
|
||||
LUKS, login and Mango + DMS succeeded, and the guest reported `+virgl`.
|
||||
|
|
|
|||
|
|
@ -48,6 +48,14 @@ disposable VM; `serial-driver.py recovery` now automates the same check.
|
|||
|
||||
## Matrix
|
||||
|
||||
Desktop wallpapers: four generated JPEG choices are bundled into the installer
|
||||
and seeded into the installation user's `Pictures/Wallpapers` folder and
|
||||
`/etc/skel` without replacing existing images. The live ISO build copies the
|
||||
same files into its user's folder. Asset provisioning and preservation are
|
||||
unit-tested. All four images were copied into the running disposable QEMU
|
||||
playground and their SHA-256 hashes matched the repository files. A fresh
|
||||
ISO/install with these assets has not been run.
|
||||
|
||||
Virtual-machine integration: QEMU/KVM, VMware and VirtualBox detection,
|
||||
hypervisor-specific guest packages, Mesa video targets, system services and
|
||||
Mango display helpers are implemented and unit-tested. The current visible
|
||||
|
|
|
|||
28
installer-rs/assets/wallpapers/README.md
Normal file
28
installer-rs/assets/wallpapers/README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Phoebus wallpapers
|
||||
|
||||
These four 1672 × 941 JPEGs were generated for Phoebus OS with the built-in
|
||||
image generation tool, then exported at JPEG quality 88 with metadata removed.
|
||||
They are bundled in the installer binary so the installed desktop has offline
|
||||
choices, and copied into the live user's wallpaper folder during ISO assembly.
|
||||
The installer seeds `~/Pictures/Wallpapers` and `/etc/skel/Pictures/Wallpapers`
|
||||
without replacing existing files. The branded SVG remains the live installer
|
||||
background.
|
||||
|
||||
Generation prompts (each also specified a 16:9, full-bleed desktop image with
|
||||
no people, text, logos, watermark or interface elements):
|
||||
|
||||
- **desert-arch.jpg:** A striking quiet landscape of a monumental sandstone
|
||||
arch in a vast high desert at blue hour, with a thin warm amber horizon glow
|
||||
and distant layered mesas; refined cinematic matte painting with subtle
|
||||
photographic texture, wide open sky and a darker central area.
|
||||
- **aurora-lagoon.jpg:** An otherworldly glacial lagoon beneath a pale green
|
||||
aurora, black volcanic stones mirrored in still water, and distant snow
|
||||
ridges; cinematic landscape photography, low horizon, broad soft sky, cool
|
||||
teal and deep navy with tiny warm lights on the horizon.
|
||||
- **stone-strata.jpg:** Elegant abstract geological strata, flowing mineral
|
||||
bands and carved stone contours like an aerial canyon, with a subtle copper
|
||||
seam; tactile matte stone and fine grain in charcoal, slate, chalk and muted
|
||||
terracotta, with broad smooth areas for desktop readability.
|
||||
- **misty-lake.jpg:** A misty forest lake at first light with one quiet island
|
||||
of dark pines, fading mountains, silver fog and glassy water; fine art
|
||||
landscape photograph with spacious sky in sage, slate blue and charcoal.
|
||||
BIN
installer-rs/assets/wallpapers/aurora-lagoon.jpg
Normal file
BIN
installer-rs/assets/wallpapers/aurora-lagoon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 280 KiB |
BIN
installer-rs/assets/wallpapers/desert-arch.jpg
Normal file
BIN
installer-rs/assets/wallpapers/desert-arch.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 298 KiB |
BIN
installer-rs/assets/wallpapers/misty-lake.jpg
Normal file
BIN
installer-rs/assets/wallpapers/misty-lake.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 254 KiB |
BIN
installer-rs/assets/wallpapers/stone-strata.jpg
Normal file
BIN
installer-rs/assets/wallpapers/stone-strata.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 448 KiB |
|
|
@ -14,6 +14,27 @@ use crate::error::{ExecError, Result};
|
|||
use crate::exec::Exec;
|
||||
use crate::portage;
|
||||
|
||||
/// A compact, curated collection that is available offline from first login.
|
||||
/// Keep the file names stable so a selected DMS wallpaper survives upgrades.
|
||||
const DEFAULT_WALLPAPERS: [(&str, &[u8]); 4] = [
|
||||
(
|
||||
"aurora-lagoon.jpg",
|
||||
include_bytes!("../../../assets/wallpapers/aurora-lagoon.jpg"),
|
||||
),
|
||||
(
|
||||
"desert-arch.jpg",
|
||||
include_bytes!("../../../assets/wallpapers/desert-arch.jpg"),
|
||||
),
|
||||
(
|
||||
"misty-lake.jpg",
|
||||
include_bytes!("../../../assets/wallpapers/misty-lake.jpg"),
|
||||
),
|
||||
(
|
||||
"stone-strata.jpg",
|
||||
include_bytes!("../../../assets/wallpapers/stone-strata.jpg"),
|
||||
),
|
||||
];
|
||||
|
||||
pub fn install(
|
||||
exec: &Exec,
|
||||
config: &InstallConfig,
|
||||
|
|
@ -520,6 +541,82 @@ pub fn provision_installed_welcome(exec: &Exec, config: &InstallConfig) -> Resul
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Seed the installation user's wallpaper folder and the skeleton for future
|
||||
/// accounts. Existing images are never replaced, including namesakes that a
|
||||
/// user has edited after installation.
|
||||
pub fn provision_wallpapers(exec: &Exec, config: &InstallConfig) -> Result<()> {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
if !config.desktop.profile.is_desktop() {
|
||||
return Ok(());
|
||||
}
|
||||
let target = exec.target();
|
||||
let skel = "etc/skel/Pictures/Wallpapers";
|
||||
target.ensure_dir_mode(skel, 0o755)?;
|
||||
for &(name, image) in &DEFAULT_WALLPAPERS {
|
||||
let rel = format!("{skel}/{name}");
|
||||
if !target.exists(&rel) {
|
||||
target.write(&rel, image)?;
|
||||
let path = target.resolve(&rel)?;
|
||||
std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o644))
|
||||
.map_err(|e| ExecError::io(path, e))?;
|
||||
}
|
||||
}
|
||||
|
||||
let username = &config.user.username;
|
||||
let home = format!("{}/{}", config.user.home.trim_end_matches('/'), username);
|
||||
let home_rel = home.trim_start_matches('/');
|
||||
if username.is_empty() || !target.resolve(home_rel)?.is_dir() {
|
||||
return Err(ExecError::operation(
|
||||
"desktop",
|
||||
"seed wallpapers",
|
||||
format!("installed user's home is missing: {home}"),
|
||||
));
|
||||
}
|
||||
let pictures = format!("{home_rel}/Pictures");
|
||||
let folder = format!("{pictures}/Wallpapers");
|
||||
let pictures_existed = target.exists(&pictures);
|
||||
let folder_existed = target.exists(&folder);
|
||||
target.ensure_dir(&folder)?;
|
||||
let owner = format!("{username}:{username}");
|
||||
if !pictures_existed {
|
||||
portage::chroot(
|
||||
exec,
|
||||
target.path(),
|
||||
"chown",
|
||||
&[&owner, &format!("{home}/Pictures")],
|
||||
)?;
|
||||
}
|
||||
if !folder_existed {
|
||||
portage::chroot(
|
||||
exec,
|
||||
target.path(),
|
||||
"chown",
|
||||
&[&owner, &format!("{home}/Pictures/Wallpapers")],
|
||||
)?;
|
||||
}
|
||||
for &(name, image) in &DEFAULT_WALLPAPERS {
|
||||
let rel = format!("{folder}/{name}");
|
||||
if target.exists(&rel) {
|
||||
continue;
|
||||
}
|
||||
let path = target.write(&rel, image)?;
|
||||
std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o644))
|
||||
.map_err(|e| ExecError::io(path, e))?;
|
||||
portage::chroot(
|
||||
exec,
|
||||
target.path(),
|
||||
"chown",
|
||||
&[&owner, &format!("{home}/Pictures/Wallpapers/{name}")],
|
||||
)?;
|
||||
}
|
||||
exec.logger.info(format!(
|
||||
"seeded {} wallpapers in {home}/Pictures/Wallpapers",
|
||||
DEFAULT_WALLPAPERS.len()
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
@ -886,6 +983,40 @@ mod tests {
|
|||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wallpapers_seed_current_and_future_users_without_overwriting_edits() {
|
||||
let runner = RecordingRunner::new();
|
||||
let exec = make_exec(runner.clone());
|
||||
let mut cfg = InstallConfig::default();
|
||||
cfg.desktop.profile = DesktopProfile::Mango;
|
||||
cfg.user.username = "phoebus".into();
|
||||
exec.target().ensure_dir("home/phoebus").unwrap();
|
||||
provision_wallpapers(&exec, &cfg).unwrap();
|
||||
for (name, bytes) in DEFAULT_WALLPAPERS {
|
||||
let current = exec
|
||||
.root
|
||||
.join(format!("home/phoebus/Pictures/Wallpapers/{name}"));
|
||||
let future = exec
|
||||
.root
|
||||
.join(format!("etc/skel/Pictures/Wallpapers/{name}"));
|
||||
assert_eq!(std::fs::read(current).unwrap(), bytes);
|
||||
assert_eq!(std::fs::read(future).unwrap(), bytes);
|
||||
}
|
||||
let custom = exec
|
||||
.root
|
||||
.join("home/phoebus/Pictures/Wallpapers/desert-arch.jpg");
|
||||
std::fs::write(&custom, b"user's edited wallpaper").unwrap();
|
||||
provision_wallpapers(&exec, &cfg).unwrap();
|
||||
assert_eq!(std::fs::read(custom).unwrap(), b"user's edited wallpaper");
|
||||
assert!(runner.recorded().iter().any(|spec| {
|
||||
spec.program == "chroot"
|
||||
&& spec
|
||||
.args
|
||||
.iter()
|
||||
.any(|arg| arg == "/home/phoebus/Pictures/Wallpapers")
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_welcome_or_flatpaks_for_headless_profile() {
|
||||
let runner = RecordingRunner::new();
|
||||
|
|
@ -893,8 +1024,10 @@ mod tests {
|
|||
let mut cfg = InstallConfig::default();
|
||||
cfg.desktop.profile = DesktopProfile::None;
|
||||
provision_installed_welcome(&exec, &cfg).unwrap();
|
||||
provision_wallpapers(&exec, &cfg).unwrap();
|
||||
install_flatpak_apps(&exec, &cfg).unwrap();
|
||||
assert!(!exec.root.join("usr/local/bin/phoebus-welcome").exists());
|
||||
assert!(!exec.root.join("etc/skel/Pictures/Wallpapers").exists());
|
||||
assert!(runner.recorded().is_empty());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -861,6 +861,7 @@ impl Installer {
|
|||
}
|
||||
desktop::install_flatpak_apps(&self.exec, &self.config)?;
|
||||
desktop::provision_installed_welcome(&self.exec, &self.config)?;
|
||||
desktop::provision_wallpapers(&self.exec, &self.config)?;
|
||||
Ok(())
|
||||
})();
|
||||
self.exec.umount_chroot()?;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ fn live_package_list_carries_the_desktop_stack() {
|
|||
#[test]
|
||||
fn live_build_requires_the_desktop_and_fails_clearly() {
|
||||
let build = read("installer/live/build.sh");
|
||||
assert!(build.contains("home/phoebus/Pictures/Wallpapers"));
|
||||
assert!(build.contains("installer-rs/assets/wallpapers"));
|
||||
// The desktop compositor and shell must be verified before packing.
|
||||
assert!(build.contains("usr/bin/mango"));
|
||||
assert!(build.contains("usr/bin/dms"));
|
||||
|
|
|
|||
|
|
@ -383,6 +383,13 @@ printf 'PHOEBUS_BUILD_ID=%s\n' "$build_id" > "$rootfs/etc/phoebus/build"
|
|||
install -d -m 0700 "$rootfs/home/phoebus/.config/DankMaterialShell"
|
||||
: > "$rootfs/home/phoebus/.config/DankMaterialShell/.firstlaunch"
|
||||
: > "$rootfs/home/phoebus/.config/DankMaterialShell/.changelog-${dms_version%.*}"
|
||||
# Give the live desktop the same offline wallpaper choices as an installed
|
||||
# account. The tmpfiles rule below owns the entire live home for phoebus.
|
||||
install -d -m 0755 "$rootfs/home/phoebus/Pictures/Wallpapers"
|
||||
for wallpaper in "$root/installer-rs/assets/wallpapers/"*.jpg; do
|
||||
[[ -f "$wallpaper" ]] || { echo "no default wallpapers found" >&2; exit 1; }
|
||||
install -m 0644 "$wallpaper" "$rootfs/home/phoebus/Pictures/Wallpapers/"
|
||||
done
|
||||
|
||||
# Quickshell frontend: the welcome window and the graphical installer, each a
|
||||
# self-contained config with the shared Common module materialised.
|
||||
|
|
@ -414,6 +421,10 @@ for check in \
|
|||
etc/xdg/quickshell/phoebus-install/shell.qml \
|
||||
usr/share/phoebus/branding/emblem.svg \
|
||||
usr/share/phoebus/branding/wallpaper.svg \
|
||||
home/phoebus/Pictures/Wallpapers/aurora-lagoon.jpg \
|
||||
home/phoebus/Pictures/Wallpapers/desert-arch.jpg \
|
||||
home/phoebus/Pictures/Wallpapers/misty-lake.jpg \
|
||||
home/phoebus/Pictures/Wallpapers/stone-strata.jpg \
|
||||
etc/phoebus/live \
|
||||
usr/local/bin/phoebus-nvidia-load \
|
||||
usr/local/bin/phoebus-gpu-report \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue