Skip to content

phone/dev: apps, panels and the terminal open in the nested session - #173

Merged
derekross merged 4 commits into
derekross:mainfrom
Nerkyator:phone-dev-121
Oct 30, 2026
Merged

derekross merged 4 commits into
derekross:mainfrom
Nerkyator:phone-dev-121

Conversation

@Nerkyator

@Nerkyator Nerkyator commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Closes #121. On current Omarchy the desktop harness (phone/dev/run-desktop) launched no apps (and, with PATH fixed 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 through omarchy-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's bin/ on PATH, so launches go through omamobile-launch as on the phone. phone/dev/bin stand-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 runs xdg-terminal-exec.
  • 1aab105 (item 4): run-desktop builds an Omarchy tree under ~/android/phone-dev/omarchy (a copy of the shell, everything else linked) and runs the nested session with OMARCHY_PATH pointing at it, so omarchy-shell reaches the nested shell through qs ipc on Omarchy 4.0.6. A phone/dev/bin/omarchy-shell wrapper puts OMARCHY_PATH back after Omarchy's env-bootstrap resets it in every interactive and login bash, and a stand-in refuses omarchy-restart-shell, which would restart the desktop's shell.
  • 2f13dfc: the harness's copy of shell.json has the idle lock off, as a phone emulator never locks. Once 1aab105 let the idle lock reach the nested shell, the window locked after 60 s behind this computer's account password, and the idle lock also runs omarchy-system-lock, whose cleanup (a user-wide pkill of the screensaver, and 1password --lock) reaches the whole desktop session. The profile in the package keeps its 60 s, and a comment in run-desktop says why.
  • 0b03d36 (item 2, and the web-app note under the items): a phone/dev/bin/gtk-launch stand-in, as you suggested. Entries GIO would start through D-Bus activation (DBusActivatable=true and a bus name, GLib's own test) are launched with the session bus address at /dev/null, so GIO runs their Exec in the nested session; every other entry goes straight to /usr/bin/gtk-launch. The shell's XDG_DATA_DIRS starts 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's XDG_DATA_HOME.

omamobile-launch and every other file under packages/ are unchanged, apart from the harness's IPC command in packages/omamobile-shell/plugins/README.md (see Packages below). Nothing here runs on a phone.

The limits are in the gtk-launch header and phone/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

  • Phone: none: the desktop harness only, on a laptop (Omarchy 4.0.6-1, Hyprland 0.56.2, Quickshell 0.3.2.r7.g2b4501a, Qt 6.12.0, glib 2.90.1)
  • Kernel release (uname -r): n/a, nothing runs on a phone
  • Packages changed, with versions: omamobile-shell, not bumped (still 0.2.32): only plugins/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-check passes, against upstream main at 4bcaebc with the branch merged onto it (my origin is my fork)
  • tests/all passes, on that merge
  • tests/packages: packages/omamobile-shell/test/all passes on that merge (the only package touched)
  • Each changed package has its version bumped: not bumped, see Packages above
  • Commits have area prefixes and bodies that say why; AI help is a Co-Authored-By: trailer

On the phone

  • I ran this on my own phone, booted into this build: n/a, the change is the desktop harness only
  • Runbook steps passed: n/a; what ran in the harness is below
  • What I did not test: Omarchy's web apps themselves (none installed on this laptop; the app-list change was checked with imv and an offscreen Quickshell probe, and the browser hand-off is read from Omarchy's scripts), a file opened from the nested Files in another app, Omarchy 4.5 (4.0.6 only), Telegram and Disks (the other two DBusActivatable entries here), and a harness started outside a uwsm session
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1): it never runs on a phone

Tested in the harness

On the laptop above, with phone/dev/run-desktop alone:

  • App drawer and ALT+Return open in the nested window (WAYLAND_DISPLAY=wayland-2). The stand-ins print their error and exit 1.
  • omarchy-shell shell ping answers from the nested Hyprland's exec, an interactive bash and a login bash; listPlugins lists the phone plugins; the dock swipe and the home pill open recents.
  • After 85 s without input the window still shows the home screen.
  • Files, from the drawer and through omamobile-launch, opens in the nested window with DBUS_SESSION_BUS_ADDRESS=unix:path=/dev/null, and nothing opens on the desktop; the omamobile-launch launch ran in an app-graphical.slice scope. inotify shows the stand-in, then /usr/bin/gtk-launch, opened for each launch, so uwsm-app's scope resolves gtk-launch through the caller's PATH. foot keeps the session bus.
  • The drawer's search finds imv with the XDG_DATA_DIRS change and not without it (its /usr/share entry has NoDisplay=true, this computer's own copy doesn't). A Quickshell DesktopEntries probe with the harness's HOME lists 38 entries with uwsm's XDG_DATA_HOME before and after the change, and with it unset 36 before and 38 after.
  • After every run the desktop's windows, its single shell instance (which still answered its own ping) and the systemd activation environment were unchanged.

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.

pr-recents

Files, launched from the drawer, in the nested window:

pr-files

Not in this PR

  • Home-screen tiles didn't react to a mouse click: that's omamobile.home: with a mouse, app tiles on the home screen don't respond to a click #147, which omamobile-shell 0.2.45: home-screen tiles take a mouse click #161 fixes.
  • The nested shell's clipboard plugin starts with a pkill of every wl-paste --watch …/shell/plugins/clipboard/capture.sh, so it also stops the desktop's clipboard watchers (the desktop restarts them within a second), and its capture.sh stores copied images under XDG_STATE_HOME, which uwsm points at the real home. Omarchy's plugin, not changed here.
  • The nested shell sometimes crashes with a SIGSEGV. Most crashes here (7 of 11) were in Qt's OpenSSL backend at start, around the home widgets' HTTPS requests, and that one happened before this branch too. The other 4 were in Mesa's renderer under Qt Quick's scene graph: I saw those only in this branch's runs (only two runs came before it), and haven't tied them to anything in it.

🤖 Generated with Claude Code

Nerkyator and others added 4 commits October 29, 2026 11:10
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>
@derekross

Copy link
Copy Markdown
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 PATH and none writes laptop state, and run-desktop refuses to run from inside the harness. I've approved the CI run; the README under plugins/ doesn't need a version bump, it'll ride along with the next shell release. I'll merge once CI passes. (Thanks also for the parallel mouse-click fix on #161; I'll fold the best of both there.)

@derekross
derekross merged commit d289f53 into derekross:main Oct 30, 2026
2 checks passed
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.
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>
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.

phone/dev/run-desktop: app launches, the terminal binding and summoned panels don't work on current Omarchy

2 participants