PolyMeilex / rfd

Rusty File Dialog
MIT License
524 stars 59 forks source link

Dialog does not appear in WSL #194

Open tgross35 opened 2 months ago

tgross35 commented 2 months ago

I am attempting to open a simple dialog via rfd::FileDialog::new().pick_file(). This works on other systems but attempting to run in WSL gives the following error without opening the dialog:

[2024-05-01T02:25:36Z ERROR rfd::backend::xdg_desktop_portal] pick_file error No such file or directory (os error 2)

Using rfd 0.14.1 with no specific features enabled or diabled. xdg-desktop installs available:

libghc-xdg-desktop-entry-dev/lunar 0.1.1.1-2build1 amd64
libghc-xdg-desktop-entry-doc/lunar 0.1.1.1-2build1 all
libghc-xdg-desktop-entry-prof/lunar 0.1.1.1-2build1 amd64
xdg-desktop-portal-dev/lunar 1.16.0-2ubuntu1 all
xdg-desktop-portal-gnome/lunar 44~beta-1ubuntu2 amd64
xdg-desktop-portal-gtk/lunar 1.14.1-1 amd64
xdg-desktop-portal-kde/lunar 5.27.4.1-0ubuntu1 amd64
xdg-desktop-portal-lxqt/lunar 0.3.0-0ubuntu4 amd64
xdg-desktop-portal-tests/lunar 1.16.0-2ubuntu1 amd64
xdg-desktop-portal-wlr/lunar 0.6.0-1 amd64
xdg-desktop-portal/lunar 1.16.0-2ubuntu1 amd64
PolyMeilex commented 2 months ago

Perhaps try to install zenity, it should fallback to it in case your xdg portal is not running as expected.