From 43921cc59db301bd915c251e9246078609b4719d Mon Sep 17 00:00:00 2001 From: Derek Ross Date: Tue, 3 Nov 2026 08:36:50 -0500 Subject: [PATCH] omamobile-shell 0.2.97: the Phone and Messages agent is enabled at every login On a fresh install of the Pixel 7 Pro (2026-11-03), opening Messages showed "Messages service isn't running: you can read, not send". omatel-agent was installed, with its D-Bus activation file and a user unit that is preset enabled (WantedBy=default.target), but a preset reaches a session only when something applies it, and nothing had: the unit read "disabled", and `systemctl --user start omatel-agent` fixed it at once. omamobile-setup-user runs at every login, so it now runs `systemctl --user enable --now omatel-agent.service` there whenever the unit is installed. Enabling and starting are idempotent, so this is not a once-only step with a marker: a session where the enable failed (firstboot has no user manager) gets it at the next login, and the agent is up from login on, so incoming calls and texts notify with no app open. A failure is reported and never fails the setup. Nothing happens without the unit. The test runs the script three times against a home with the unit present (two logins, then one with systemctl failing) and once without it, with the unit directory pointed at a scratch one (OMAMOBILE_USER_UNITS, as the other test paths are). The apps' own fix, activating the agent over D-Bus when they open (omamessages 0.2.2, omaphone 0.2.3), covers the app opened in a session where this hasn't run. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d --- packages/omamobile-shell/README.md | 2 +- .../omamobile-shell/bin/omamobile-setup-user | 16 ++++++++++++++++ packages/omamobile-shell/test/setup-user.sh | 18 ++++++++++++++++++ packages/omamobile-shell/version | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-shell/README.md b/packages/omamobile-shell/README.md index 75a6f6799..873f44479 100644 --- a/packages/omamobile-shell/README.md +++ b/packages/omamobile-shell/README.md @@ -20,7 +20,7 @@ Omarchy Mobile's phone profile for Omarchy's own shell. It isn't a fork: these a | `plugins/omamobile.access` | The permission sheet: "Allow Camera to use the camera?" with the app's icon and two large buttons, in place of xdg-desktop-portal-gtk's desktop dialog | | `plugins/omamobile.fingerprint` | The under-display fingerprint sensor: target during verification, enrollment screen | | `profile/shell.json` | The phone layout the setup seeds once | -| `bin/omamobile-setup-user` | Omarchy Mobile's per-user setup (Omarchy lifecycle `setup-user`); `--adopt`, for a user set up by hand rather than by firstboot, marks the once-only steps that would overwrite or repeat what that user has (the shell profile, the monitor scale, the cursor and keyboard lines, the screensaver, Files' click policy) done without running them; the other steps run as for a new user (missing phone plugins and an idle block go into `shell.json`, Chromium's flags are written), and the setup service then runs at each login | +| `bin/omamobile-setup-user` | Omarchy Mobile's per-user setup (Omarchy lifecycle `setup-user`); at every login it also enables and starts the Phone and Messages agent's user unit (`omatel-agent.service`, when installed), so calls and texts notify with no app open; `--adopt`, for a user set up by hand rather than by firstboot, marks the once-only steps that would overwrite or repeat what that user has (the shell profile, the monitor scale, the cursor and keyboard lines, the screensaver, Files' click policy) done without running them; the other steps run as for a new user (missing phone plugins and an idle block go into `shell.json`, Chromium's flags are written), and the setup service then runs at each login | | `bin/omamobile-launch` | One app per screen: every launch from the shell (drawer, home screen, widgets, links, the agent) gets a new empty workspace through a per-launch Hyprland exec rule, or focuses the app's open window; and the switcher's "Show with…" and "Move to its own screen" | | `bin/omamobile-osk-watch` | Reports squeekboard's visibility (sm.puri.OSK0) to the fingerprint, keyboard and launcher plugins | | `bin/omamobile-screenshot-open` | What a screenshot toast's tap ("Tap to view", patch 0020) opens on a phone (`OMARCHY_SCREENSHOT_EDITOR`, set in `environment.d/30-omamobile-screenshot.conf`; Omarchy passes the saved file's path): the screenshot in Loupe (omamobile-apps), fitted, with touch zoom, pan and swipe, and Loupe's copy, share and delete. Tensaku, Omarchy's default, can't be panned or zoomed by touch; without Loupe it is the fallback, through `omamobile-screenshot-edit` | diff --git a/packages/omamobile-shell/bin/omamobile-setup-user b/packages/omamobile-shell/bin/omamobile-setup-user index 574501017..741315172 100755 --- a/packages/omamobile-shell/bin/omamobile-setup-user +++ b/packages/omamobile-shell/bin/omamobile-setup-user @@ -480,6 +480,22 @@ if command -v "${OMAMOBILE_VOXTYPE:-voxtype}" >/dev/null && [[ -f $voxmodels/ggm fi fi fi +# The Phone and Messages agent (omatel-agent, pulled in by omamobile-apps) +# runs from login, so an incoming call or text notifies with no app open. +# Its user unit is preset enabled (WantedBy=default.target), but a preset +# reaches a session only when something applies it, and on a fresh install +# of the Pixel 7 Pro (2026-11-03) it never was: Messages opened to "service +# isn't running" until the unit was started by hand. So enable it, and +# start it now, at every login: idempotent (systemd keeps an enabled unit +# enabled and a running one running), only where the unit is installed, and +# never a failure of this script (firstboot runs without a user manager, and +# the next login does it). The apps also activate the agent over D-Bus when +# they open; this is for the notifications between their openings. +units=${OMAMOBILE_USER_UNITS:-/usr/lib/systemd/user} +if [[ -f $units/omatel-agent.service ]]; then + systemctl --user enable --now omatel-agent.service || + echo "omamobile-setup-user: could not enable omatel-agent.service; trying again at the next login" >&2 +fi # Voxtype on the phone (docs/VOICE-PLAN.md, phase 3): Omarchy's base.en # stays the model, with Whisper's audio context cut to the clip's length # (context_window_optimization, for clips under 22.5 s). On the Pixel 7 Pro diff --git a/packages/omamobile-shell/test/setup-user.sh b/packages/omamobile-shell/test/setup-user.sh index 1a128319c..98bd44f1a 100644 --- a/packages/omamobile-shell/test/setup-user.sh +++ b/packages/omamobile-shell/test/setup-user.sh @@ -59,6 +59,7 @@ run() { GSETTINGS_NO_CLICK_POLICY="${GSETTINGS_NO_CLICK_POLICY:-}" \ OMAMOBILE_VOICE_MODELS="${RUN_VOICE_MODELS:-$t/no-voice-models}" OMAMOBILE_VOXTYPE="${RUN_VOXTYPE:-voxtype}" \ OMARCHY_PATH="${RUN_OMARCHY_PATH:-$t/omarchy}" \ + OMAMOBILE_USER_UNITS="${RUN_USER_UNITS:-$t/no-user-units}" \ bash bin/omamobile-setup-user "$@" >"$t/out" 2>&1 || { cat "$t/out"; fail "omamobile-setup-user runs"; } } run @@ -347,6 +348,23 @@ RUN_HOME=$hk run [[ -L $hk/.local/share/squeekboard/keyboards/fr.yaml ]] || fail "the others are linked beside it" pass "the keyboard: a layout of the user's own stays" +# The Phone and Messages agent: enabled and started at every login where its +# user unit is installed (not once: a preset the session never applied left +# it disabled on a fresh install), nothing without the unit, and a login with +# no user manager (the enable fails) doesn't fail the setup +U=$t/user-units; mkdir -p "$U"; touch "$U/omatel-agent.service" +hm=$t/home-agent; mkdir -p "$hm/.config/hypr" "$hm/.config/omarchy/extensions" +cp "$H"/.config/hypr/{looknfeel,autostart,monitors}.lua "$hm/.config/hypr/" +RUN_HOME=$hm RUN_USER_UNITS=$U run +RUN_HOME=$hm RUN_USER_UNITS=$U run +[[ $(grep -cx 'systemctl --user enable --now omatel-agent.service' "$hm/calls") == 2 ]] || fail "omatel-agent.service is enabled and started at every login" +touch "$hm/systemctl-fails" +RUN_HOME=$hm RUN_USER_UNITS=$U run +grep -c 'could not enable omatel-agent.service' "$t/out" >/dev/null || fail "a failed enable is reported, not fatal" +rm "$hm/systemctl-fails" +if grep -c 'omatel-agent' "$H/calls" >/dev/null 2>&1; then fail "nothing is enabled without the agent's unit"; fi +pass "the Phone and Messages agent is enabled and started at each login where its unit is installed" + # --adopt: a user set up by hand, with no markers, keeps the files the # overwriting steps would change (shell.json, the scale, the cursor and # keyboard lines, the screensaver), while the steps that check before they diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index cd47fa294..832560a97 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.94 +0.2.97