Repository navigation
phone/dev: apps, panels and the terminal open in the nested session - #173
Merged
Merged
Conversation
Every launch from the phone shell goes through omamobile-launch, which run-desktop never put on PATH, so tapping an app did nothing (derekross#121, item 1). run-desktop now exports PATH with the package's bin/. Three helpers there would act on the laptop from inside the harness: omamobile-bt-agent becomes this computer's default BlueZ agent when the Bluetooth panel opens, omamobile-fp-enroll enrolls on its fingerprint reader, and omamobile-set-pin changes the account password. phone/dev/bin comes first on PATH with stand-ins that refuse to run; the first two print the error event their panel already shows. ALT+Return ran alacritty, which Omarchy no longer installs (item 3). It now runs xdg-terminal-exec (foot here), started directly rather than through Omarchy's uwsm launchers, so it opens in the nested session. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2) with phone/dev/run-desktop alone: apps started from the app drawer and ALT+Return open in the nested window (WAYLAND_DISPLAY=wayland-2), and omamobile-launch resolves to the package's bin/; the stand-ins print their error and exit 1. The host's activation environment, windows, shell and notifications owner were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Panels the phone shell opens through omarchy-shell never opened in the harness: recents from the dock swipe and the home pill, the clipboard, fingerprint setup (derekross#121, item 4). omarchy-shell finds the shell at $OMARCHY_PATH/shell, through qs ipc (and, from Omarchy 4.5, a socket named from the same string), while the harness ran a copy of the shell elsewhere with OMARCHY_PATH left at /usr/share/omarchy. run-desktop now builds ~/android/phone-dev/omarchy: a real copy of the shell, every other entry linked to the Omarchy it was started from. The nested session runs with OMARCHY_PATH set to it and the shell started from $OMARCHY_PATH/shell, so omarchy-shell reaches the nested shell, and the display filter keeps it off the desktop's. An interactive or login bash sets OMARCHY_PATH back (Omarchy's env-bootstrap), so phone/dev/bin gets an omarchy-shell that restores it from PHONE_DEV_OMARCHY_PATH. With omarchy-shell working, Omarchy's menu can open in the session too, and its Update > Process > Shell (like omarchy-font-set) runs omarchy-restart-shell, which takes OMARCHY_PATH from the systemd user manager and stops that shell on every display: the desktop's. phone/dev/bin refuses it. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2): omarchy-shell shell ping answers from the nested Hyprland's exec, an interactive bash and a login bash, and listPlugins lists the phone plugins; the dock swipe and the home pill open recents. The desktop's shell still answered its own ping, and its windows and the systemd activation environment were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone profile locks after 60 s idle. Now that omarchy-shell reaches the nested shell, the harness window locked too, behind this computer's account password, and the idle lock first runs omarchy-system-lock, whose cleanup (pkill of the screensaver, 1password --lock) acts on the whole desktop session. A phone emulator doesn't lock on its own either. run-desktop now writes its copy of the profile's shell.json with the idle lock off (0). The screensaver is already off in the profile, so the idle service starts no timer at all. Only the harness's copy changes; the profile in the package keeps its 60 s. Tested on a laptop (Omarchy 4.0.6): after 85 s idle the window still shows the home screen, and the shell logs "idle-cycle-cancel: idle-timers-disabled". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Files still opened on the desktop when started from the harness (derekross#121, item 2). Its entry has DBusActivatable=true, so gtk-launch asks the session bus, which the nested session shares with this computer, to start org.gnome.Nautilus, and the bus starts it from the systemd user manager, with the desktop's environment. phone/dev/bin now has a gtk-launch stand-in, which launches reach by name through uwsm-app with the caller's PATH. For an entry GIO would activate over D-Bus (DBusActivatable=true and a basename that is a bus name, GLib's own test), it runs /usr/bin/gtk-launch with DBUS_SESSION_BUS_ADDRESS at /dev/null (unset, GLib would still find $XDG_RUNTIME_DIR/bus), and GIO runs the entry's Exec in the nested session instead. Every other entry goes to the real gtk-launch unchanged, and omamobile-launch is unchanged, so nothing differs on the phone. The stand-in's header and phone/README.md list what such an app loses without the session bus, and the hand-offs to and from the desktop that remain. The shell runs with its own HOME, and Omarchy's app library reads $HOME/.local/share for hidden entries and icons, so the nested drawer hid an app the desktop shows (imv); without uwsm's XDG_DATA_HOME it would also miss this computer's own entries, Omarchy's web apps among them (derekross#121's web-app note). run-desktop now puts the real data directory first in the shell's XDG_DATA_DIRS, and builds the shell's command with printf %q, since Hyprland runs it with sh -c. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2, glib 2.90.1): Files, from the app drawer and through omamobile-launch, opens in the nested window (WAYLAND_DISPLAY=wayland-2, session bus at /dev/null) in an app-graphical.slice scope, and nothing opens on the desktop. inotify shows the stand-in, then /usr/bin/gtk-launch, opened for each launch, and foot keeps the session bus. The drawer finds imv with the change and not without it. A Quickshell DesktopEntries probe with the harness's HOME lists 36 entries without XDG_DATA_HOME and 38 with the new XDG_DATA_DIRS, with or without it. The desktop's windows, its shell and the systemd activation environment were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Welcome, and thank you for such a thorough first PR! Following the plan from #121 one step per commit makes it easy to review, and the stand-ins that refuse the Bluetooth agent, enrolment, the PIN change and the shell restart are exactly the care this harness needs on someone's real desktop. I read every helper the plugins call with the harness's |
W4HO-ham
added a commit
to W4HO-ham/omarchy-mobile
that referenced
this pull request
Nov 1, 2026
The zumapro compatible of the gs201 modem link driver and its binding, stacked on kernel derekross#144; the DT nodes follow once that stack is on omamobile.
5 of 9 tasks
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
…erekross#173) * phone/dev: launch apps and open a terminal in the nested session Every launch from the phone shell goes through omamobile-launch, which run-desktop never put on PATH, so tapping an app did nothing (derekross#121, item 1). run-desktop now exports PATH with the package's bin/. Three helpers there would act on the laptop from inside the harness: omamobile-bt-agent becomes this computer's default BlueZ agent when the Bluetooth panel opens, omamobile-fp-enroll enrolls on its fingerprint reader, and omamobile-set-pin changes the account password. phone/dev/bin comes first on PATH with stand-ins that refuse to run; the first two print the error event their panel already shows. ALT+Return ran alacritty, which Omarchy no longer installs (item 3). It now runs xdg-terminal-exec (foot here), started directly rather than through Omarchy's uwsm launchers, so it opens in the nested session. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2) with phone/dev/run-desktop alone: apps started from the app drawer and ALT+Return open in the nested window (WAYLAND_DISPLAY=wayland-2), and omamobile-launch resolves to the package's bin/; the stand-ins print their error and exit 1. The host's activation environment, windows, shell and notifications owner were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * phone/dev: give the nested session an Omarchy tree omarchy-shell finds Panels the phone shell opens through omarchy-shell never opened in the harness: recents from the dock swipe and the home pill, the clipboard, fingerprint setup (derekross#121, item 4). omarchy-shell finds the shell at $OMARCHY_PATH/shell, through qs ipc (and, from Omarchy 4.5, a socket named from the same string), while the harness ran a copy of the shell elsewhere with OMARCHY_PATH left at /usr/share/omarchy. run-desktop now builds ~/android/phone-dev/omarchy: a real copy of the shell, every other entry linked to the Omarchy it was started from. The nested session runs with OMARCHY_PATH set to it and the shell started from $OMARCHY_PATH/shell, so omarchy-shell reaches the nested shell, and the display filter keeps it off the desktop's. An interactive or login bash sets OMARCHY_PATH back (Omarchy's env-bootstrap), so phone/dev/bin gets an omarchy-shell that restores it from PHONE_DEV_OMARCHY_PATH. With omarchy-shell working, Omarchy's menu can open in the session too, and its Update > Process > Shell (like omarchy-font-set) runs omarchy-restart-shell, which takes OMARCHY_PATH from the systemd user manager and stops that shell on every display: the desktop's. phone/dev/bin refuses it. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2): omarchy-shell shell ping answers from the nested Hyprland's exec, an interactive bash and a login bash, and listPlugins lists the phone plugins; the dock swipe and the home pill open recents. The desktop's shell still answered its own ping, and its windows and the systemd activation environment were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * phone/dev: no idle lock in the nested session The phone profile locks after 60 s idle. Now that omarchy-shell reaches the nested shell, the harness window locked too, behind this computer's account password, and the idle lock first runs omarchy-system-lock, whose cleanup (pkill of the screensaver, 1password --lock) acts on the whole desktop session. A phone emulator doesn't lock on its own either. run-desktop now writes its copy of the profile's shell.json with the idle lock off (0). The screensaver is already off in the profile, so the idle service starts no timer at all. Only the harness's copy changes; the profile in the package keeps its 60 s. Tested on a laptop (Omarchy 4.0.6): after 85 s idle the window still shows the home screen, and the shell logs "idle-cycle-cancel: idle-timers-disabled". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * phone/dev: open D-Bus-activated apps in the nested session Files still opened on the desktop when started from the harness (derekross#121, item 2). Its entry has DBusActivatable=true, so gtk-launch asks the session bus, which the nested session shares with this computer, to start org.gnome.Nautilus, and the bus starts it from the systemd user manager, with the desktop's environment. phone/dev/bin now has a gtk-launch stand-in, which launches reach by name through uwsm-app with the caller's PATH. For an entry GIO would activate over D-Bus (DBusActivatable=true and a basename that is a bus name, GLib's own test), it runs /usr/bin/gtk-launch with DBUS_SESSION_BUS_ADDRESS at /dev/null (unset, GLib would still find $XDG_RUNTIME_DIR/bus), and GIO runs the entry's Exec in the nested session instead. Every other entry goes to the real gtk-launch unchanged, and omamobile-launch is unchanged, so nothing differs on the phone. The stand-in's header and phone/README.md list what such an app loses without the session bus, and the hand-offs to and from the desktop that remain. The shell runs with its own HOME, and Omarchy's app library reads $HOME/.local/share for hidden entries and icons, so the nested drawer hid an app the desktop shows (imv); without uwsm's XDG_DATA_HOME it would also miss this computer's own entries, Omarchy's web apps among them (derekross#121's web-app note). run-desktop now puts the real data directory first in the shell's XDG_DATA_DIRS, and builds the shell's command with printf %q, since Hyprland runs it with sh -c. Tested on a laptop (Omarchy 4.0.6, Hyprland 0.56.2, glib 2.90.1): Files, from the app drawer and through omamobile-launch, opens in the nested window (WAYLAND_DISPLAY=wayland-2, session bus at /dev/null) in an app-graphical.slice scope, and nothing opens on the desktop. inotify shows the stand-in, then /usr/bin/gtk-launch, opened for each launch, and foot keeps the session bus. The drawer finds imv with the change and not without it. A Quickshell DesktopEntries probe with the harness's HOME lists 36 entries without XDG_DATA_HOME and 38 with the new XDG_DATA_DIRS, with or without it. The desktop's windows, its shell and the systemd activation environment were unchanged afterwards. tests/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Closes #121. On current Omarchy the desktop harness (
phone/dev/run-desktop) launched no apps (and, withPATHfixed by hand, opened Files on the desktop), bound ALT+Return to a terminal Omarchy no longer installs, and never showed the panels the phone shell opens throughomarchy-shell(recents among them). This follows the plan agreed in #121, one commit per step:d6cb4bb(items 1 and 3): the nested session gets the package'sbin/onPATH, so launches go throughomamobile-launchas on the phone.phone/dev/binstand-ins come first and refuse the three helpers that would act on the laptop (omamobile-bt-agent,omamobile-fp-enroll,omamobile-set-pin). ALT+Return runsxdg-terminal-exec.1aab105(item 4):run-desktopbuilds an Omarchy tree under~/android/phone-dev/omarchy(a copy of the shell, everything else linked) and runs the nested session withOMARCHY_PATHpointing at it, soomarchy-shellreaches the nested shell throughqs ipcon Omarchy 4.0.6. Aphone/dev/bin/omarchy-shellwrapper putsOMARCHY_PATHback after Omarchy'senv-bootstrapresets it in every interactive and login bash, and a stand-in refusesomarchy-restart-shell, which would restart the desktop's shell.2f13dfc: the harness's copy ofshell.jsonhas the idle lock off, as a phone emulator never locks. Once1aab105let the idle lock reach the nested shell, the window locked after 60 s behind this computer's account password, and the idle lock also runsomarchy-system-lock, whose cleanup (a user-widepkillof the screensaver, and1password --lock) reaches the whole desktop session. The profile in the package keeps its 60 s, and a comment inrun-desktopsays why.0b03d36(item 2, and the web-app note under the items): aphone/dev/bin/gtk-launchstand-in, as you suggested. Entries GIO would start through D-Bus activation (DBusActivatable=trueand a bus name, GLib's own test) are launched with the session bus address at/dev/null, so GIO runs theirExecin the nested session; every other entry goes straight to/usr/bin/gtk-launch. The shell'sXDG_DATA_DIRSstarts with the real data directory, so the app list hides only what the desktop hides (before, it hid imv, which the desktop shows), and finds this computer's own entries even without uwsm'sXDG_DATA_HOME.omamobile-launchand every other file underpackages/are unchanged, apart from the harness's IPC command inpackages/omamobile-shell/plugins/README.md(see Packages below). Nothing here runs on a phone.The limits are in the
gtk-launchheader andphone/README.md: an app started without the session bus loses what it does over it (for Files, the Trash, Recent and Network locations), and so does what it opens (by my reading, not tried: an HTML file Files opens starts the browser without its keyring, unless the browser is already open on the desktop); an app that hands off to an instance already open on the desktop still opens there, the browser and so Omarchy's web apps included, and one started in the window takes the desktop's own launches until it closes.Device and build
4.0.6-1, Hyprland0.56.2, Quickshell0.3.2.r7.g2b4501a, Qt6.12.0, glib2.90.1)uname -r): n/a, nothing runs on a phoneomamobile-shell, not bumped (still0.2.32): onlyplugins/README.md, which the package installs but which only describes the laptop harness, so the next bump carries it. Tell me if you'd rather have a bump here.Checks (no phone needed)
tools/pr-checkpasses, against upstreammainat4bcaebcwith the branch merged onto it (myoriginis my fork)tests/allpasses, on that mergetests/packages:packages/omamobile-shell/test/allpasses on that merge (the only package touched)versionbumped: not bumped, see Packages aboveCo-Authored-By:trailerOn the phone
DBusActivatableentries here), and a harness started outside a uwsm sessionuserdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1): it never runs on a phoneTested in the harness
On the laptop above, with
phone/dev/run-desktopalone:WAYLAND_DISPLAY=wayland-2). The stand-ins print their error and exit 1.omarchy-shell shell pinganswers from the nested Hyprland's exec, an interactive bash and a login bash;listPluginslists the phone plugins; the dock swipe and the home pill open recents.omamobile-launch, opens in the nested window withDBUS_SESSION_BUS_ADDRESS=unix:path=/dev/null, and nothing opens on the desktop; theomamobile-launchlaunch ran in anapp-graphical.slicescope. inotify shows the stand-in, then/usr/bin/gtk-launch, opened for each launch, souwsm-app's scope resolvesgtk-launchthrough the caller'sPATH. foot keeps the session bus.XDG_DATA_DIRSchange and not without it (its/usr/shareentry hasNoDisplay=true, this computer's own copy doesn't). A QuickshellDesktopEntriesprobe with the harness'sHOMElists 38 entries with uwsm'sXDG_DATA_HOMEbefore and after the change, and with it unset 36 before and 38 after.Screenshots
Recents, with Files open. The card shows the app's id,
org.gnome.Nautilus, rather than its name: that's #122, which draft #123 fixes, and this PR doesn't touch it.Files, launched from the drawer, in the nested window:
Not in this PR
pkillof everywl-paste --watch …/shell/plugins/clipboard/capture.sh, so it also stops the desktop's clipboard watchers (the desktop restarts them within a second), and itscapture.shstores copied images underXDG_STATE_HOME, which uwsm points at the real home. Omarchy's plugin, not changed here.🤖 Generated with Claude Code