Repository navigation
Conversation
…t survive Omarchy's Secret-portal migration
Omarchy's migration 1788261467 ("Expose GNOME Keyring to sandboxed apps
through the Secret portal") writes ~/.config/xdg-desktop-portal/
hyprland-portals.conf with default=hyprland;gtk and the Secret line.
xdg-desktop-portal takes the user's file first, so after that migration
the phone's picks in /etc/xdg/xdg-desktop-portal/hyprland-portals.conf
(FileChooser=gnome;gtk, Access=omamobile;gtk) no longer applied: file
dialogs were GTK 3's desktop chooser again. It needs 623 px; on the
Pixel 9a's 405 px Hyprland squeezed its buffer to the screen, text drawn
tall and narrow (WhatsApp web app, Attach > Photos & videos).
omamobile-setup-user now adds, at each login, every line of the /etc file
whose interface the user's file doesn't name yet, under a comment, and
restarts xdg-desktop-portal only when it added one. No user file: nothing
is made. A line the user set (FileChooser=gtk) stays. Every login, not
once, since the migration can arrive with any later update.
test/setup-user.sh: Omarchy's file, two logins: both lines added once,
Secret kept, one portal restart; a user's own FileChooser line kept; no
file made where there was none.
On a Pixel 9a (omamobile-shell 0.2.127, omarchy-settings 4.5.0-3): with
Omarchy's file in place a portal OpenFile opened xdg-desktop-portal-gtk;
after the new step the file gained the two lines and the same call
opened Nautilus (org.gnome.Nautilus), full screen; WhatsApp's Attach >
Photos & videos picked a file through it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for this, and for tracking it down to the migration rather than to the chooser. I checked it against Omarchy 4.5.0-3's own packages: the migration writes exactly the file you describe, and The change reads well: only the interfaces the user's file doesn't name, the user's own line kept, nothing created where there is no file, the portal restarted only when something was added, and a test that checks each of those. I ran the new step on its own against a few files in a scratch folder and it behaved as described, including a file without a final newline. A few small things, none of them blocking, if you'd like to take them in the same push:
On the version: #555 also uses 0.2.128, as you noted. I'll set the number when I merge, so please leave it as it is. Before merging I'll run it on my Pixel 7 Pro: read the user's portal file, install this build, log in again, and open a file chooser and a permission request. I'll report here. |
…ys suspend is verified (#737) * omamobile-shell 0.2.129: auto-sleep on by default where the device says suspend is verified omamobile-sleepd (s2idle 30 s after the screen goes off behind a secure lock) shipped off on every phone. On the Pixel 7 Pro it is now verified: a night asleep with about 22 h of standby, power off, and double tap waking the phone from sleep (SUSPEND-PLAN, 2026-11-13). Turn the toggle on once, at login, on a phone whose device package installs /usr/share/omamobile/auto-sleep-default; every other phone keeps it off, and a user who turns it off keeps it off. With the modem up the phone still doesn't sleep (its inhibitor stays until linux-omarchy-mobile#232). 0.2.128 is claimed by #555 and #727. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-shell: the default-off test allows only the device-gated auto-sleep step The package test refused any code that turns the omamobile-sleep toggle on. #737 adds exactly one such step, gated on the device package's auto-sleep-default. The test now allows that one line and checks that the gate sits right above it; anything else that turns the toggle on still fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # packages/omamobile-shell/test/setup-user.sh # packages/omamobile-shell/version
…er-group file alone Review of derekross#727: - A symlinked ~/.config/xdg-desktop-portal/hyprland-portals.conf (dotfile setups) or one the user can't write is left as it is, with a line in the login's output, instead of writing through the link or failing the setup unit under set -e at every login. - A user's line with blanks around the = ("FileChooser = gtk") counts as theirs, and the key's dots are escaped in the pattern, so they no longer match any character. - The lines are only added while the file's last group is [preferred], since they go at the end. test/setup-user.sh checks each case; taking out the symlink check, the writable check, the group check, the blanks or the escaping each fails a check of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@derekross, points 1 to 3 are in
On the 9a, Point 4, Measured on my phone with Claude. |
derekross
left a comment
There was a problem hiding this comment.
Thank you for taking all three points, and for the mutation runs: I repeated the symlink one here, and with that check removed the test fails on its own line, as you say. The rules now read well, and reading the phone's lines from our own /etc file, so the two can never drift apart, is a nice design.
I owe you an apology, though, and some news that should have been here a week ago. On 18 November W4HO-ham opened #886 for the same bug, with the same fix in the same function, and I wrote there that I expected to take #886 and credit your find in its commit, once I had run it on my Pixel 7 Pro. I never said so here, so you spent this morning on a branch I hadn't told you was in question. I'm sorry about that.
The two can't both land, and I haven't made the final choice yet; I'll make it when I do the 7 Pro run I promised you on the 13th: the user's portal file before and after a login, a file chooser from Chromium, and a permission request. Whichever goes in, your find and your work on the rules are credited in the commit. Your smoke report from the 9a is still welcome, but it doesn't hold anything up.
|
Decision: this is the one we take. Thank you for reworking it. I owe you an apology for not telling you sooner that #886 fixed the same bug in the same function. Both are correct; yours keeps one source for the phone's portal picks, and its comment line in the user's file is a nice touch. Next is my run on the Pixel 7 Pro (a log-out and log-in, then the user's portal file checked), then I'll merge main in, set the next shell number and squash it. |
derekross
left a comment
There was a problem hiding this comment.
I ran this on my Pixel 7 Pro today, built from your head merged with main, and my phone had exactly the bug: Omarchy 4.5's file in ~/.config/xdg-desktop-portal/hyprland-portals.conf held only default=hyprland;gtk and the Secret line. After the login step (omamobile-setup-user) the file keeps both of Omarchy's lines and gains your comment line plus org.freedesktop.impl.portal.Access=omamobile;gtk and org.freedesktop.impl.portal.FileChooser=gnome;gtk under [preferred]; a second run leaves it byte for byte the same, and it stays a regular file owned by the user. It passes on the 7 Pro. It needs main merged in and the next shell number before the squash; I'll push that to your branch.
Omarchy's migration
1788261467.sh("Expose GNOME Keyring to sandboxed apps through the Secret portal", omarchy-settings 4.5) writes~/.config/xdg-desktop-portal/hyprland-portals.confcontainingdefault=hyprland;gtkand the Secret line. xdg-desktop-portal reads the user's file first, so after that migration the phone's picks in/etc/xdg/xdg-desktop-portal/hyprland-portals.confstop applying:FileChooser=gnome;gtk: file dialogs are GTK 3's desktop chooser again. It needs 623 px, and the Pixel 9a has 405 px, so Hyprland squeezes its buffer to fit the screen and the text is drawn tall and narrow.Access=omamobile;gtk: the permission question goes back to GTK's dialog.Here it showed up in the WhatsApp web app, under Attach › Photos & videos. On this phone the migration ran with
omamobile-updateon 2026-11-12.Change: at each login,
omamobile-setup-usercopies every line from the/etcfile whose interface the user's file doesn't name yet. The added lines go under a comment. xdg-desktop-portal is restarted only when a line was added.FileChooser=gtk) is kept.Tests:
test/setup-user.shpasses on the phone. The new case starts from Omarchy's file and runs two logins. It checks that both lines are added once, that the Secret line stays, and that the portal restarts once. It also checks that a user's ownFileChooserline is kept and that no file is created where there was none. I haven't runtest/all.On a Pixel 9a (omamobile-shell 0.2.127, omarchy-settings 4.5.0-3):
OpenFilecall openedxdg-desktop-portal-gtk.org.gnome.Nautilus) full screen.The version is 0.2.128, which #555 also uses. Renumber as needed.
Found with an AI assistant (Claude), tested on my phone.
🤖 Generated with Claude Code