Repository navigation
AppImages for x86_64 and arm64 - #43
Merged
Merged
Conversation
Issue #41 asks for AppImages. An AppImage installs nothing, so what an installed Weir finds in fixed places has to name the AppImage file: - weir_protocol::appimage::appimage() reads APPIMAGE and APPDIR, which the AppImage's starter sets, and trusts them only when Weir's own file is inside APPDIR: a terminal opened from another AppImage passes them on too. - Start at login: login::AppImageLogin writes its own ~/.config/systemd/user/weir.service from the installed unit's template, with ExecStart naming the AppImage (quoted for systemd: % and $ doubled, quotes and backslashes escaped) and a first line marking it as Weir's. Weir only ever changes or removes a unit with that line. At each start it points the unit at the AppImage's current path, so moving or renaming the AppImage, or replacing it with a newer one under another name, keeps working. - Restart starts the AppImage file rather than the mounted copy, so a newer AppImage put in its place is what runs. The AppImage's starter keeps the image mounted while any process holds a pipe it hands down, so restart first marks every inherited file to close, letting go of the old mount. - diagnostics::Install::AppImage: bug reports say "AppImage, PATH", and the update notifier says to put the new AppImage in place of this one, or let Gear Lever or AppImageUpdate update it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Running from an AppImage, Weir is not in the application menu, and off
Plasma the desktop portal's hotkeys need its menu entry too. The window
asks once, under the top bar ("Add Weir to your application menu?"),
unless the menu already has Weir from an installed copy. Adding writes
~/.local/share/applications/weir.desktop from the installed entry's
template, with Exec naming the AppImage (quoted as the desktop entry
specification asks, % doubled, backslashes doubled again for the string
value), TryExec so a deleted AppImage hides it, and X-Weir-AppImage to
mark it as Weir's; and the two icons. At each start the window points
that entry at the AppImage's current path.
Preferences > General gets an AppImage box: where Weir runs from, Add or
Remove the menu entry (removing takes the icons too when nothing else
in the menu needs them), and the command to link weirctl to the
AppImage, with a Copy button. About's Licenses... opens the AppImage's
own licenses folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
make appimage-dir lays out the AppImage's contents: what make install
puts down under /usr, less the guides and the login unit, the programs
stripped, plus packaging/appimage/AppRun, which starts the window, the
service ("weir-daemon" as first word, as Weir's own login unit does) or
weirctl (that word, or a link named weirctl). make appimage packs it
with appimagetool, embedding update information for Gear Lever and
AppImageUpdate (gh-releases-zsync, the latest release's .zsync for the
same architecture), and writes the .zsync file with zsyncmake.
Nothing is bundled but Weir: its programs need only the C library and
PipeWire's library, and PipeWire's must be the system's, since it loads
its plugins from the system's folders. Built on Ubuntu 24.04, it runs on
systems from 2024 on, which leaves out only those whose PipeWire is too
old for Weir anyway.
The Packages workflow builds it on both architectures with appimagetool
1.9.1 and runtime 20251108 (pinned; their checksums are printed), checks
the menu entry and AppStream file, runs weirctl and weir-daemon from it,
and checks the embedded update information. A release attaches both
AppImages and their .zsync files, with the AppImages in SHA256SUMS and
the attestation.
The README offers the AppImage for any other distribution, the user
guide has a section on running from one, and CLI, ARCHITECTURE and
CONTRIBUTING say what is different.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
An AppImage turns on start at login by writing its own ~/.config/systemd/user/weir.service, which takes the place of the installed unit. Try the AppImage on a computer with Weir installed, turn start at login on there, delete the AppImage, and the next login starts nothing: the unit names a file that is gone, and the installed Weir cannot tell. An installed Weir now removes such a unit at startup once the AppImage it names is gone, switching the installed unit on in its place if it was on, and also when start at login is turned on in the installed Weir, which means that copy. Tried with a stand-in systemctl: a unit for a deleted AppImage goes and start at login stays on, one for an AppImage that is there stays, and ticking the box takes over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
So they can be read from the end of the log and pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
The one-color tray icon goes to the panel by name, weir-symbolic, which packages install into the icon theme. An AppImage installs nothing (its menu entry adds the icons, but only when asked), so with the one-color icon chosen the panel had nothing to show. The tray now names the icon folder inside the AppImage as its icon theme path, which Plasma and GNOME's AppIndicator extension search; the AppImage stays mounted while the service runs. Checked over D-Bus with a stand-in AppImage: the item names the mounted folder, and weir-symbolic.svg is in it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Restart Weir from an AppImage starts the AppImage file, so that a newer one put in its place runs. But a newly downloaded file is not allowed to run, and starting it failed: the old service had already shut down, so Weir was simply gone. The restart now allows the file to run first, as its owner would before opening it. If it still cannot be started (a folder that forbids running programs, a file owned by someone else), it holds on to the mount again and starts the running version from it, rather than stop. Tried with a stand-in AppImage: a replacement that was not allowed to run became allowed and ran, in the same process; on a mount that forbids running programs, the same process came back from the old mount, still answering. The guide's updating advice now covers both ways: in place under the old name, then Restart Weir; or quit, open the new file, delete the old one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
The runtime at the front of every Weir AppImage, and appimagetool which packs it, are downloaded from the AppImage project's releases. The job now checks both against checksums kept in the workflow, so a file changed upstream stops the build instead of going into Weir's releases. The checksums are those of the files this pull request's builds used (1.9.1 and 20251108). A new version means new checksums, which the failing check prints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
So a new version's checksums can be read from the failed run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
A restart keeps the process id, so the tray came back under the very bus name the old icon had just given up, about 60 ms later. GNOME's AppIndicator extension takes that as the old item re-registering and resets it, and the icon was gone until Weir was started afresh (the mixer and its window kept working). Seen on Ubuntu 26.04, and reproduced here on a headless GNOME Shell 46 with the extension: the panel had no Weir indicator after `weirctl restart`. After a restart (the restarted program has WEIR_RESTARTED set; the window Weir starts does not) the tray now registers under its connection's unique name, which is new each time. The extension treats it as a new icon and drops the old one. Plasma's, Cinnamon's and COSMIC's watchers take a unique name like any other (read in their sources); on GNOME the icon is there after each restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
The tray names the AppImage's usr/share/icons as its icon theme path. GNOME's AppIndicator extension then looks the icon up in a theme of that one folder, which finds hicolor's folders only through a theme index the AppImage does not have, or files right in the folder. So it found nothing, and the icon showed as "…" (Ubuntu 26.04). The AppImage now carries weir-symbolic.svg at the top of that folder too. Checked on a headless GNOME Shell 46 with the extension: the lookup failed with the old layout and finds the new file, and after a restart the panel shows the one-color icon. Switching styles while Weir runs still leaves the color picture under the new icon until a restart: the extension does not clear a picture when an icon gets a name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Off Plasma, a hotkey says what it did in a notification marked transient and low urgency. GNOME Shell never shows a banner for a low urgency notification (messageTray.js: _onNotificationRequestBanner), and a transient one is not kept in its list, so on GNOME nothing was ever seen (Ubuntu 26.04). Normal urgency shows it; Cinnamon already showed them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
While an AppImage runs, the program at its front keeps running to serve its files, so the file cannot be written over: Linux Mint's file manager said it was in use. Updating in place and then choosing Restart Weir only works where the file is replaced rather than rewritten, as AppImage managers do. The guide and the update notice now say: quit Weir, allow the new file to run, open it, and delete the old one; or let an AppImage manager do it and choose Restart Weir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
On COSMIC (Pop!_OS 24.04) Weir cannot set keys itself, and a shortcut in the desktop's settings runs one command per press, so a hotkey that acts while held only works there as a tap. Say so, name COSMIC, and point AppImage users to linking weirctl first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Brings in the README's note that the ARM packages are untested on ARM hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
As the ARM packages: built and tested on GitHub's ARM machines only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Testers found that Restart Weir brought the tray icon back but never the mixer, on every desktop, and that Weir then ignored "When Weir starts". The window closes for a restart, and the tray asked for no window afterwards. A service the window started also carries --no-window, which the restart kept, so the new one never opened a window whatever the setting said. Only services started at login, without that flag, came back with their window. Now a window that was open is always asked back (tray, weirctl restart and SIGUSR1 alike), and the restart drops --no-window, since the window that passed it has closed. With no window open, the new service opens one as "When Weir starts" says, as at any other start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
On Ubuntu, switching the tray icon to one color drew the one-color mark over the color picture until Weir restarted. GNOME's AppIndicator extension, told that an icon shown as a picture now has a name, sets the named icon but never clears the picture. A new icon, as a restart gives, is drawn cleanly. So a change of look now takes the tray icon down and puts up a new one, with a new bus name. The tray's handle and its command sender live together in ShownTray for that. Tested in a headless GNOME Shell 46 with the extension: color, one color, color again, each clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
On Pop!_OS, the tray menu showed a white square by Show the mixer and a white circle by Restart Weir. COSMIC draws every named menu icon in one color, so a color icon comes out as its own outline filled white: Weir's rounded square, and the theme's round refresh icon. Show the mixer now carries Weir's icon as a 32 px PNG made from the window's, which every desktop draws as it is, also from an AppImage whose icons are in no theme. The other entries name `-symbolic` icons; where a theme lacks one, the desktop falls back to the plain name. Checked in GNOME Shell's menu; COSMIC's source draws a picture as is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
On Ubuntu, "The desktop's popup" and "A notification" did the same, which looked like a fault. Only Plasma lets other programs use its popup; elsewhere Weir shows a notification for either. That was said on hover only; now a line under the choices says it on other desktops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
The red dot that marks recording was an overlay picture, which Plasma lays over the icon itself. On a scaled display Plasma copies only the top-left quarter of it, so the user's own PC showed a quarter circle filling the corner, while a VM at 100% looked right. GNOME and Cinnamon draw no overlay at all, so Ubuntu and Mint showed no dot. Now the color icon's pictures have the dot drawn in while recording, which every desktop shows as it is. The one-color icon goes by name, so it gets the overlay by name instead (media-record), which Plasma draws right at any scale. The menu's recording entries get a red dot picture too: their media-record-symbolic icon came out as a plain white or black dot on COSMIC, GNOME and Cinnamon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
On the user's Nobara, logging out and straight back in left the AppImage's Weir in the tray without its window, although "When Weir starts" said to open it; restarting the computer opened it. The service had kept running through the logout: the systemd user manager outlives a logout when the next login follows within logind's UserStopDelaySec, 10 seconds by default. Then nothing starts at the new login, the login unit included, as the manager never left default.target, and the window had closed with the old desktop. With the RPM, Plasma reopened the window it had open at logout; it cannot for an AppImage, whose old mount is gone. The service now watches logind on the system bus for a new graphical login of its own user, here and not a login screen's. It waits until the new desktop's tray is back, or 10 seconds where there is no tray to wait for, gives the desktop a moment to reopen its own window, and then opens the window as "When Weir starts" says unless one is open. The window gets the user manager's display variables, which the new desktop has handed over by then, since the service's own may name the old desktop. Tested with a stand-in logind and tray watcher: other users' and console logins are passed over, the window opens once the tray is back (minimized when set so), not when one is open or with "Tray only", and after 12 seconds without a tray icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
The AUR recipe listed only x86_64, so makepkg on Arch Linux ARM would refuse it. Weir builds the same way there, so the recipe now lists aarch64 too, with a comment saying no one has tried it on an ARM computer yet and asking for reports. The README says how to build on Arch Linux ARM until Weir is in the AUR, and CONTRIBUTING that nothing here builds or tests that combination. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
A strip or bus being recorded has a red outline drawn 2 px outside its frame, and the mixer's scroll area clips exactly at its sides, so the first strip's outline lost its left side (and the last bus's its right side once scrolled to the end). The scroll area now reaches 3 px into the window's margin on either side and the row starts and ends 3 px in, so the strips sit exactly where they did and the outline always has room. Nothing moves when a recording starts: the room is kept whether or not anything records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
Clippy 1.99 (the stable toolchain in CI since this week) adds chunks_exact_to_as_chunks, which fails the build on png_of's chunks_exact(4). as_chunks::<4>() reads each pixel as an array, so the channels are named instead of indexed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #41. Stacked on #42 (ARM builds): merge that first, then change this one's base to
main.What it adds
make appimage, built in the Packages workflow on both architectures and attached to releases with.zsyncfiles, checksums and attestations.packaging/appimage/AppRunstarts the window, orweir-daemonwhen that is the first word, orweirctl(that word, or a link namedweirctl).aarch64, so Arch Linux ARM users can build Weir from the AUR once it's there. Nothing here builds or tests that combination. The recipe, README and CONTRIBUTING say it hasn't been tried on an ARM computer and ask for reports.Weir, when it runs from an AppImage
It knows by
APPIMAGEandAPPDIR, trusted only when its own program file is insideAPPDIR.~/.config/systemd/user/weir.service, naming the AppImage. Weir marks it as its own and keeps it pointing at the AppImage when the file moves.~/.local/share. Off Plasma, hotkeys need that entry. Weir keeps the entry pointing at the AppImage, and Preferences › General › AppImage adds or removes it and shows how to linkweirctl.Also for every Weir, found while testing
--no-window. Now an open window always comes back, and with none open, the restarted service does as When Weir starts says. This applies to the tray,weirctl restartand SIGUSR1.UserStopDelaySec(10 s by default), so nothing starts at that login. With the RPM, Plasma reopened the window it had open; it can't for an AppImage, whose old mount is gone.logins.rs).media-record), which Plasma draws right.-symbolicicons.Tested
.zsyncfile,weirctlandweir-daemonstarting from the AppImage, and the update information read back from the runtime.systemctl;--window, and SIGUSR1. The window came back or stayed closed as described, and the service kept its process ID each time.🤖 Generated with Claude Code
https://claude.ai/code/session_01PWaMWDrXpfpALWtEnsyueZ