feat: default login-screen wallpaper

Ship a default wallpaper (blossoms by Nikhil Kumar, Unsplash License) in
a new 0:/os/wallpapers/ directory for OS-provided imagery, staged from
programs/data/wallpapers/. login.elf falls back to
0:/os/wallpapers/default.jpg when the desktop config names no wallpaper
or the configured file cannot be opened. Attribution added to
THIRD-PARTY-NOTICES.txt and man legal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 16:05:54 +02:00
parent 16e6482bb0
commit 37c51f31fc
5 changed files with 38 additions and 3 deletions
+11 -1
View File
@@ -94,9 +94,14 @@ LICDIR := data/licenses
LICSRC := $(wildcard $(LICDIR)/*.txt)
LICDST := $(patsubst $(LICDIR)/%,$(BINDIR)/os/licenses/%,$(LICSRC)) $(BINDIR)/os/licenses/NOTICES.txt $(BINDIR)/os/licenses/LICENSE.txt
# Wallpapers bundled into bin/os/wallpapers/.
WPDIR := data/wallpapers
WPSRC := $(wildcard $(WPDIR)/*.jpg)
WPDST := $(patsubst $(WPDIR)/%,$(BINDIR)/os/wallpapers/%,$(WPSRC))
.PHONY: all clean 2048 doom fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap login desktop shell rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs icons fonts configs bearssl libc tls libjpeg libjpegwrite install-apps libloader libs crashpad check-syscalls gen-syscalls
all: bearssl libc libjpeg libjpegwrite tls libloader libs $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(FWDST) $(LICDST)
all: bearssl libc libjpeg libjpegwrite tls libloader libs $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(FWDST) $(LICDST) $(WPDST)
# Build BearSSL static library (cross-compiled for freestanding x86_64).
BEARSSL_INCLUDES := -isystem $(shell cd .. && pwd)/kernel/freestnd-c-hdrs/x86_64/include -isystem $(abspath include/libc)
@@ -370,6 +375,11 @@ $(BINDIR)/os/licenses/%: $(LICDIR)/%
mkdir -p $(BINDIR)/os/licenses
cp $< $@
# Copy wallpapers into bin/os/wallpapers/.
$(BINDIR)/os/wallpapers/%: $(WPDIR)/%
mkdir -p $(BINDIR)/os/wallpapers
cp $< $@
# Build each system program from its source files.
$(BINDIR)/os/%.elf: src/%/main.cpp link.ld GNUmakefile
mkdir -p $(BINDIR)/os obj/$*
Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

+2
View File
@@ -53,5 +53,7 @@
Program - MPL-2.0
* Intel Bluetooth firmware (0:/os/firmware/intel), Copyright (c) Intel
Corporation - Intel redistributable firmware license
* Default wallpaper photo (0:/os/wallpapers), by Nikhil Kumar -
Unsplash License
Full license texts and notices are on this system in 0:/os/licenses/.
+6 -2
View File
@@ -8,6 +8,9 @@
namespace {
// Shipped fallback shown when no wallpaper is configured (see NOTICES.txt).
constexpr const char* kDefaultWallpaperPath = "0:/os/wallpapers/default.jpg";
constexpr uint32_t kLoginOverlayAlpha = 0x38;
constexpr uint32_t kLoginOverlayInvAlpha = 255 - kLoginOverlayAlpha;
@@ -23,9 +26,10 @@ bool load_login_wallpaper(LoginState* ls) {
char wp[256];
montauk::strncpy(wp, doc.get_string("wallpaper.path", ""), sizeof(wp));
doc.destroy();
if (wp[0] == '\0') return false;
int fd = montauk::open(wp);
int fd = -1;
if (wp[0] != '\0') fd = montauk::open(wp);
if (fd < 0) fd = montauk::open(kDefaultWallpaperPath);
if (fd < 0) return false;
uint64_t size = montauk::getsize(fd);