Repository navigation
Conversation
…eet survive Omarchy 4.5's portal file Omarchy 4.5 gives every user a ~/.config/xdg-desktop-portal/hyprland-portals.conf with a default= line. xdg-desktop-portal (1.22.1, xdp_portal_config_find) asks each configuration file in turn for the interface's own line and then for that file's default before it goes on to the next file, so the user's default answers for FileChooser and Access, and the two lines this package ships in /etc/xdg are never reached. A web page's file input opened GTK 3's desktop dialog again, where no tap, double tap or Open enters a folder, and the permission question fell back to GTK's dialog. omamobile-setup-user now adds the two lines to the user's own file, under its [preferred] group, at any login that finds one missing (an Omarchy update may write the file again), and restarts a running xdg-desktop-portal when it changed something. A file that names the interface is left alone, whatever it names, and a user with no such file gets none. Tested: test/setup-user.sh (Omarchy's file gets both lines once and keeps its own; a second login changes and restarts nothing; an owner's own FileChooser line is kept; a rewritten file gets the lines back; no file is made where there is none) and test/all (333). On a Pixel 9a the same two lines were put into the user's file by hand and xdg-desktop-portal restarted: Chromium's file input then opened org.gnome.Nautilus, a tap opened Pictures and a folder below it, and a picked file reached the page; before, the window was xdg-desktop-portal-gtk. The package's own step then ran there against the file as Omarchy wrote it (2026-11-18): both lines went in under [preferred] and xdg-desktop-portal restarted once; a second run changed nothing and restarted nothing.
|
Thank you for this, and for reading xdg-desktop-portal's lookup rather than guessing at it. I checked both halves against the sources: One thing you couldn't have known from the code: @den-kloot opened #727 for the same bug on 2026-11-13, with the same fix (the phone's lines added to the user's file at each login). I reviewed it then and still owe it a run on my Pixel 7 Pro, so the delay is mine. The two can't both land. Yours is clean against main and puts the lines under I ran the new step on its own against a few files in a scratch folder and it does what you describe: both lines once, Omarchy's two kept, one restart, nothing on the second run. Three small things, none blocking, if you'd like to take them in the same push:
On the version: #887, #888, #890 and #204 also say 0.2.134. If this is the first of them to merge it keeps the number as it is; the later ones each need a push of the next free number before they merge, and I'll say which when I get there. CONTRIBUTING asks for a |
…e file alone and reads an owner's line with blanks From the review of this pull request. A user's hyprland-portals.conf that is a link (a dotfile setup) is left as it is, with a line saying what it lacks, since sed -i would replace the link with a copy. A file sed can't write to is reported and the rest of omamobile-setup-user goes on, where under set -e it stopped the setup at every login. An owner's line written with blanks around its "=" counts as theirs, so no second line is added above it. Tested: test/setup-user.sh gains the three cases (a linked file stays a link and unchanged, with the line; an unwritable directory is reported and the setup ends normally with nothing half-written; an owner's line with blanks is kept and no second one is added), and test/all passes.
|
Thank you for checking it against the sources, and for pointing me to #727: I hadn't seen it, and I'm glad for den-kloot's find to be credited. All three are in a second commit (08d5b79):
The phone-smoke report will follow tonight. The palmtop is on the published kernel for a sleep series all day, and I'd rather the report came from its everyday state. |
derekross
left a comment
There was a problem hiding this comment.
Thank you, all three are in as I'd hoped, each with its test: the link stays a link, an unwritable file is reported and the setup goes on, and an owner's line with blanks counts as theirs. CI is green on the new head and nothing is open on the code.
Two things are left, both mine. I still owe this a login on my Pixel 7 Pro (the user's file before and after, the file chooser from Chromium, and a permission request), and I'll close #727 with den-kloot's find credited in this commit once that run is done. The phone-smoke report from the palmtop is welcome whenever it comes off its sleep series; it doesn't hold anything up.
On the number: #890 goes in first and keeps 0.2.134, so this one becomes 0.2.135. I'll push that to your branch myself when it's this one's turn, unless you'd rather do it.
Since my Pixel 9a took Omarchy 4.5, a web page's "attach a file" opened GTK 3's desktop file dialog again instead of Nautilus's touch chooser: I could get into Pictures, but no tap, double tap or Open would enter a folder below it.
The cause is a file Omarchy 4.5 gives every user,
~/.config/xdg-desktop-portal/hyprland-portals.conf, withdefault=hyprland;gtk. xdg-desktop-portal (1.22.1,xdp_portal_config_find) asks each configuration file in turn for the interface's own line and then for that same file'sdefaultbefore it goes on to the next file. So the user'sdefaultanswers for FileChooser and for Access, and the two lines omamobile-shell ships in/etc/xdg/xdg-desktop-portal/hyprland-portals.confare never reached. The permission question falls back to GTK's dialog the same way.omamobile-setup-usernow adds the two lines to the user's own file, under its[preferred]group, at any login that finds one missing (an Omarchy update may write the file again), and restarts a running xdg-desktop-portal when it changed something. A file that already names the interface is left alone, whatever it names, so an owner who wants another backend says so there. A user with no such file gets none.Tested:
test/setup-user.sh: Omarchy's file gets both lines once and keeps its own, a second login changes nothing and restarts nothing, an owner's own FileChooser line is kept, a rewritten file gets the lines back, and no file is made where there is none.test/allpasses, andtools/pr-check origin/main.7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, Omarchy 4.5), first by hand: with the two lines in the user's file and xdg-desktop-portal restarted, Chromium's file input openedorg.gnome.Nautilus("Open Files"), a tap opened Pictures and a folder below it, and a picked file reached the page. Before, the window wasxdg-desktop-portal-gtk.[preferred]and xdg-desktop-portal restarted once; a second run changed nothing and restarted nothing.Not tested: the package installed as a package on a phone (the step ran from this branch's script, not from an installed omamobile-shell), and the permission sheet after the change (only the file chooser was tried by hand).
tests/packagesfails in omamobile-omarchy on my laptop with and without this change (qmlformat on two of the installed Omarchy's files), nothing else.It bumps omamobile-shell to 0.2.134, and so does my swipe pull request that follows; whichever lands second gets a rebase from me.