Skip to content

appstamp: stamp freedesktop metadata onto .deb app binaries - #225

Open
schotek wants to merge 2 commits into
VitruvianOS:masterfrom
schotek:features/appstamp
Open

schotek wants to merge 2 commits into
VitruvianOS:masterfrom
schotek:features/appstamp

Conversation

@schotek

@schotek schotek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Implements #224.

Adds appstamp, a tool that writes BeOS application attributes onto a .deb binary from its freedesktop .desktop metadata, so Deskbar and Tracker show the real icon and name instead of a generic icon and the raw filename. Toolkit-agnostic — any installed .deb GUI app is covered.

What it does

  • Resolves the app's .desktop entry (or takes one explicitly), reads Name/Icon/Exec.
  • Rasterises the hicolor PNG icon to BEOS:L/M:STD_ICON (B_CMAP8), with rsvg-convert as a fallback for scalable-only themes.
  • Writes BEOS:APP_SIG (application/x-vnd.vos-<leaf>) and SYS:NAME.
  • --all stamps everything under /usr/share/applications; idempotent (skips already-stamped unless --force).

Automation

  • dpkg trigger on /usr/share/applications → restamp on package add/remove.
  • appstamp-icons.service → one-shot boot sweep.
  • Both guard on /dev/nexus_node_monitor, so chroot image builds are unaffected and a package install never fails.

Design

  • No BApplication, no BBitmap, no app_server — runs from a plain root session; plain BNode::WriteAttr.
  • Windowed apps only: NoDisplay/Terminal/ConsoleOnly/non-Application and shell-wrapper Exec lines are skipped.

Testing. Built an ISO from master + this branch. Installing a GTK app (galculator) fires the trigger and stamps BEOS:L/M:STD_ICON + APP_SIG + SYS:NAME from its hicolor icon; console/terminal entries (vim, fortune's sh -c wrapper) are correctly skipped; the boot service sweeps once.

Two commits: the tool, then the install-time automation.

Debian binaries carry no BeOS resources, so Deskbar and Tracker show a
generic icon and the raw file name. appstamp reads an application's
.desktop entry and icon theme and writes the matching BeOS attributes
(BEOS:L/M:STD_ICON, BEOS:APP_SIG, SYS:NAME) onto the executable, where
Deskbar and Tracker resolve them. Toolkit-agnostic: any installed .deb
application is stamped from its freedesktop metadata.

Runs from a plain root session -- no BApplication, no BBitmap, no
app_server. Icons come from the hicolor PNG theme, with rsvg-convert as a
fallback for scalable-only themes.
A dpkg trigger on /usr/share/applications reruns `appstamp --all` whenever
a package adds or removes a .desktop entry, and appstamp-icons.service
sweeps once at boot. Both guard on the nexus device so chroot image builds
are unaffected, and neither fails a package install.
schotek added a commit to schotek/Vitruvian that referenced this pull request Aug 12, 2026
Batch --all, a dpkg trigger on /usr/share/applications, and a one-shot boot
service; SVG-only icon themes via rsvg-convert. Same content as the
standalone appstamp submission for master (VitruvianOS#225); carried on this branch
for local Qt ISO builds until it lands upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant