Skip to main content

Module upgrade_linux

Module upgrade_linux 

Source
Expand description

The Linux side of “Upgrade & restart” (docs/specs/SPEC_UPGRADE_FOR_USERS_AND_AGENTS_2026_10_15.md §4.2, phase 3e), for upgrade_restart: checking what srv names to start (a portable’s AgentMux/agentmux.sh, or an AppImage), asking the user with zenity or kdialog, and what the new version must not inherit.

Constants§

APPIMAGELAUNCHER_OFF
Set on the new version: AppImageLauncher, when installed, otherwise stops a freshly downloaded AppImage at its “integrate?” window until someone answers.
NOT_INHERITED
What this version’s own start set for its own files, which the new version must not inherit: agentmux.sh and AppRun point LD_LIBRARY_PATH at this version’s usr/bin (the new launcher would load this libcef.so), and AppRun’s APPIMAGE… would make it think it is this AppImage. Both set their own again when the new version starts.

Statics§

DIALOG_PID 🔒
The dialog’s process while it is open (0 when none).

Functions§

check_target
Check the new version srv names at target against this install. This install is a portable in own_root, or the AppImage own_appimage; the new version, of version, is where srv puts it: beside this one, or in updates/<v>/ of the channel (channel_dir) or of this version’s data_dir.
confirm
Ask the user body in a native dialog, zenity (GNOME and most desktops) or else kdialog (KDE): a separate program no page or agent in AgentMux can click. true only for an explicit “Upgrade & restart”. With neither installed, nothing restarts: the new version is staged, and the user can start it.
confirm_labelled
confirm with its own name for the Yes button (the other is “Not now”).
dismiss
Close the open dialog (as “Not now”).
is_appimage_name 🔒
Whether name is the release’s AppImage for version (AgentMux_<v>_amd64.AppImage), or the copy srv makes beside one recorded for another channel (AgentMux_<v>_amd64-2.AppImage).
is_executable 🔒
notify
Tell the user body in a native dialog (zenity or kdialog), and wait for the OK; with neither installed, it only goes to the log.
pango_escape 🔒
text for zenity’s --text, which reads Pango markup: a path’s &, < or > shown as they are.
portable_root
The Linux portable folder (AgentMux/, holding agentmux.sh) the launcher in exe_dir (its usr/bin/) belongs to.