lxqt / xdg-desktop-portal-lxqt

A backend implementation for xdg-desktop-portal
GNU Lesser General Public License v2.1
20 stars 8 forks source link

How to get the chromium use the filechooser of lxqt #39

Closed knm100 closed 2 months ago

knm100 commented 2 months ago

I only installed XDG-Desketop-Potal-LXQt in my LXQt-kwin(wayland session) . chromium always used GTK FileChooser. Is there any way to get the chromium use FileChooser of LXQt? I have tried export GDK_DEBUG=portals or GTK_USE_PORTAL=1, but no effect to chromium.

the following message is the ouput of chromium with GTK_USE_PORTAL=1 [3961:3979:0707/234207.216520:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser” [3961:3979:0707/234207.216581:ERROR:select_file_dialog_linux_portal.cc(287)] Failed to read portal version property

the following message is the ouput of chromium with GDK_DEBUG=portals [knm@archlinux ~]$ chromium [4384:4401:0707/234653.031088:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser” [4384:4401:0707/234653.031255:ERROR:select_file_dialog_linux_portal.cc(287)] Failed to read portal version property

knm100 commented 2 months ago

if i used the compositor labwc instead of kwin_wayland, chromium worked fine with FileChooser of LXQt.

tsujan commented 2 months ago

Make ~/.config/xdg-desktop-portal/lxqt-portals.conf as

[preferred]
default=lxqt

and do

systemctl --user restart xdg-desktop-portal.service
systemctl --user restart xdg-document-portal.service
systemctl --user restart xdg-permission-store.service

Please use https://github.com/lxqt/lxqt/discussions for questions.

knm100 commented 2 months ago

It worked, thank you very much!