ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

New Steam UI fails to fallback to built-in filepicker when xdg-desktop-portal is unavailable. #9584

Open kzdixon opened 1 year ago

kzdixon commented 1 year ago
OS: Gentoo Linux
KERNEL: 6.3.7-zen1-znver4-o3-pds
CPU: AMD Ryzen 9 7950X3D 16-Core
GPU: AMD Radeon RX 7900 XTX (gfx1100, LLVM 16.0.6, DRM 3.52, 6.3.7-zen1-znver4-o3-pds)
GPU DRIVER: 4.6 Mesa 23.1.2
RAM: 64 GB

Now that this release has come out the filepicker doesn't open for me anywhere where it is applicable; be it profile, chat, or adding a non-steam game. Its completely broken for me on i3wm. No output given in terminal when Steam is launched that way either after clicking the button that should spawn pcmanfm-qt on my system.

EDIT: It seems that the only working filebrowser button is the one that behaved the same as it did prior to this New UI release which is here: image pcmanfm-qt gets opened as it should.

https://gist.github.com/kzdixon/4d7c3e646956d53aca048d40aeca090b

Originally posted by @kzdixon in https://github.com/ValveSoftware/steam-for-linux/issues/9373#issuecomment-1592156072

UPDATE: For other users on i3wm who may not have xdg-desktop-portal set up I quickly slapped together a fix by emerging rtkit xdg-desktop-portal xdg-desktop-portal-gtk, editing /usr/share/xdg-desktop-portal/portals/gtk.portal to include UseIn=gnome;i3 and starting /usr/libexec/rtkit-daemon as root, then /usr/libexec/xdg-desktop-portal-gtk and /usr/libexec/xdg-desktop-portal as my user. I likely need to add them to my startup commands for i3wm's session but have yet to confirm if that'll do the trick after a reboot. xdg-desktop-portal-lxqt did not respect my system's QT or GTK theming, hence why I swapped to the -gtk variant.

UPDATE 2: Since I'm on OpenRC I had to make a new file in /etc/local.d that I called rtkit-daemon.start to handle that portion of the startup sequence.

#!/usr/bin/env bash

description="start rtkit-daemon for xdg-desktop-portal"
name="rtkit-daemon"

depend()
{
        use dbus
}

bash -c "/usr/libexec/rtkit-daemon"

The above assumes that the local service is already set up to run in the default runlevel.

The following in my i3 config handles the xdg-desktop-portal portions:

exec --no-startup-id /usr/libexec/xdg-desktop-portal-gtk
exec --no-startup-id /usr/libexec/xdg-desktop-portal

The native filepicker (gtk) now shows up without further user intervention after rebooting.

dw5 commented 1 year ago

Also breaks add NON-STEAM game and BROWSE button is just decorative. KDE Endavour OS https://github.com/ValveSoftware/steam-for-linux/issues/9447

kzdixon commented 1 year ago

For Gentoo users, it looks like steam-overlay has added a desktop-portal USE flag and warning that vaguely hints at how to fix the issue (see: https://github.com/anyc/steam-overlay/commit/f5d81890625d21bcc8e1f903cc471daab0951403).