You are not logged in.

#1 2025-03-05 17:30:53

bowlin
Member
Registered: 2025-02-27
Posts: 60

Can't open file picker in neither Discord or Steam. (Solved)

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

#2 2025-03-05 19:50:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

pacman -Qs portal
echo $DBUS_SESSION_BUS_ADDRESS
loginctl session-status

Online

#3 2025-03-05 20:32:10

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#4 2025-03-05 20:33:57

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

Also I'm using dwm.

Offline

#5 2025-03-05 20:47:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#6 2025-03-05 21:27:52

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

My bad.
The output: https://bpa.st/KPXQ

Yes I'm using startx/xinit, .xinitrc: https://bpa.st/Z5BA

Offline

#7 2025-03-05 21:32:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#8 2025-03-06 11:54:28

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#9 2025-03-06 13:01:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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.st

After failing to get a file dialog.

Online

#10 2025-03-06 13:34:10

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#11 2025-03-12 17:55:55

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#12 2025-03-12 21:17:38

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#13 2025-03-12 21:58:20

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#14 2025-03-12 22:06:56

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#15 2025-03-12 22:25:47

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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:

https://dpaste.com/DJVH2FPSL

Offline

#16 2025-03-12 22:26:43

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

(/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 fallback
Mar 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

#17 2025-03-12 22:40:28

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#18 2025-03-12 22:55:01

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#19 2025-03-12 23:11:43

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#20 2025-03-12 23:20:14

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

.xinitrc just for clarification: https://bpa.st/OALA

Offline

#21 2025-03-12 23:34:09

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

Okay, some new stuff in systemctl --user status xdg-desktop-portal-gtk: https://bpa.st/CGLQ

Offline

#22 2025-03-12 23:37:43

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,789

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#23 2025-03-12 23:40:12

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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

#24 2025-03-12 23:50:34

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

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? big_smile Thanks for the help!

Offline

#25 2025-03-12 23:52:42

bowlin
Member
Registered: 2025-02-27
Posts: 60

Re: Can't open file picker in neither Discord or Steam. (Solved)

Okay and to top it off the backend call complaint seems to disappear if I open a file dialog.

Offline

Board footer

Powered by FluxBB