You are not logged in.
Both are installed from the main repos.
I haven't manually set up anything gtk related to start on boot. The same goes for dbus (I don't know if that's relevant), because I read in the wiki that dbus will start automatically if a process needs it.
File picker works fine in librewolf. Any help highly appreciated, will provide more info as needed.
Last edited by bowlin (2025-03-13 15:09:57)
Offline
pacman -Qs portal
echo $DBUS_SESSION_BUS_ADDRESS
loginctl session-statusOnline
pacman -Qs portal returned:
xdg-desktop portal
xdg-desktop-portal-gtk
Echo command:
unix:path=/run/user/1000/bus
loginctl session-status shows that it is indeed active.
Offline
Also I'm using dwm.
Offline
loginctl session-status shows that it is indeed active.
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855 (but you've already addressed the environment, however do you use startx/xinit and if so, what does your xinitrc look like? If not, how else do you start the session?)
Check the system journal for portal errors and in doubt try to set XDG_CURRENT_DESKTOP
Online
My bad.
The output: https://bpa.st/KPXQ
Yes I'm using startx/xinit, .xinitrc: https://bpa.st/Z5BA
Offline
Last link below, 2nd blue note on what to include at least.
I'm not even sure how you end up w/ a normal dbus environment this way - do you somewhere set that manually?
Online
Okay, added it in. The .xinitrc I had was quite old and I think I just hazily made it a couple years back.
Nope, I don't set it manually anywhere, just for clarity's sake this is my dwm autostart script: https://bpa.st/4HKA
Also tried grepping for portal/xdg/desktop -related errors in dmesg, but didn't find any.
Offline
Don't grep unless you know precisely what you're grepping for.
Please post your complete system journal for the boot:
sudo journalctl -b | curl -F 'file=@-' 0x0.stAfter failing to get a file dialog.
Online
Grepped for multiple things and went in with "less".
Anyways, here is the log: https://0x0.st/8uPe.txt
Still not used to systemd, didn't remember that journalctl even existed, used to dmesg. Now I'm seeing a bunch of xdg related stuff even without grepping for them.
Offline
After I try to get a file dialog and I check the --user status of xdg-desktop-portal, this is what I see: https://bpa.st/EPVA
I can get it working by:
/usr/lib/xdg-desktop-portal-gtk &but it acts quite weirdly, not respecting the same dark theme as firefox and appears in the left corner of my screen.
Offline
What happens if you run "/usr/lib/xdg-desktop-portal"?
appears in the left corner of my screen
How does it behave in eg. an openbox session?
Online
File picker doesn't work if I run "/usr/lib/xdg-desktop-portal" Here's the log that comes with running it: https://dpaste.com/DBV5RKWWS
Dbus log: https://bpa.st/UBSQ
journalctl --user -u xdg-desktop-portal-gtk --no-pager: https://0x0.st/8SDY.txt
Also, I haven't explicitly installed xdg-desktop-portal-gtk, it got pulled in with Lutris.
And when it comes to openbox, I haven't tried that. Used openbox for a bit on void, and never had these kind of issues before :S
Offline
Also just want to add that in for example firefox it works perfectly without any issues. It has a dark theme and spawns in the center of the screen, when using: https://www.virustotal.com/gui/home/upload for example.
Offline
Yeah and I accidentally said firefox out of memory, even though I'm using LibreWolf.
Ran xprop just in case on both file dialogs, librewolf and discord:
Offline
(/usr/lib/xdg-desktop-portal:670696): xdg-desktop-portal-WARNING **: 23:51:27.960: Choosing gtk.portal for org.freedesktop.impl.portal.FileChooser as a last-resort fallbackMar 12 23:52:38 Archie xdg-desktop-por[672305]: cannot open display:
Mar 12 23:52:38 Archie systemd[835]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Mar 12 23:52:38 Archie systemd[835]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.What does your xinitrc look like now??
Online
Here's my .xinitrc https://bpa.st/Q3NA
Also tried adding: "eval $(dbus-launch --sh-syntax --exit-with-session)" to .dwm/autostart.sh, but it didn't help.
Offline
Don't dbus-launch anything anywhere (unless you really intend to isolate a nested dbus session)
You're using but nowehere setting $xinitdir, the default version has "xinitdir=/etc/X11/xinit"
As result the environment doesn't get imported into the session which end up being broken and dbus and user services misbehave.
Online
Alright, I won't. And I should've checked the xinit wiki page more carefully, just read blindly on the wiki that "atleast include the last IF block" without checking the upper part.
Anyways, now after killing X and starting it again, it "works" the same way it works when I manually start it.
systemctl --user status xdg-desktop-portal-gtk: https://bpa.st/KICA
Offline
.xinitrc just for clarification: https://bpa.st/OALA
Offline
Okay, some new stuff in systemctl --user status xdg-desktop-portal-gtk: https://bpa.st/CGLQ
Offline
The service is now running and afaiu the remaining problem is the mislocated dialog?
(It's not gonna pick up any firefox themes, for dark gtk themes see https://wiki.archlinux.org/title/Dark_mode_switching )
=> How does it behave under openbox?
Online
The same for xdg-desktop-portal just in case: https://bpa.st/EKNA
And the thing is that in LibreWolf it works as I expect it to work, but the most important thing is that it works as intended. The rest I can deal with.
Let me check in with openbox real quick.
Offline
The complaint about the backend call (https://bpa.st/QNEQ) doesn't happen in openbox, it works relatively the same. In discord the file dialog spawns at the center, but this talk about where it spawns most likely is related to dwm's tiling, which is beyond the scope of this topic. The main thing is that it indeed works. I'm guessing there's nothing to debug anymore?
Thanks for the help!
Offline
Okay and to top it off the backend call complaint seems to disappear if I open a file dialog.
Offline