YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
3.58k stars 105 forks source link

File picker won't show up on selected applications: a dbus issue? #702

Closed abdeoliveira closed 1 day ago

abdeoliveira commented 3 days ago

Filepicker won't work in some apps unless the application is started with dbus-launch. Examples are Chromium and webplotdigitizer.

After login-logout in Hyprland and then login on niri, the problem disappears. On the other hand, I can't screen share anymore.

System Information

YaLTeR commented 2 days ago

Uhh huh? I thought that systemd should already start a d-bus session because it uses d-bus extensively.

jjramsey commented 2 days ago

Filepicker for example won't work on niri unless the application is started with dbus-launch.

Could you describe the steps that you used that fail to launch "Filepicker" (whatever that is) on Niri but work on Hyprland?

I use both SDDM and Arch, so I might be able to at least reproduce your problem. (FWIW, I do use Workrave via an Sfwbar applet, and that relies on D-Bus to work.)

abdeoliveira commented 2 days ago

Thank you for your time on this. After opening this issue I see the problem is a bit more... involving.

You can reproduce the problem like this:

  1. After reboot, login into niri through SDDM (or just run niri-session from tty).
  2. Open gmail in Chromium (I realized Firefox is not affected)
  3. Start to compose an email and click in the attach button. It should open a Filepicker, but it doesn't.

Other program affected is the not-so-popular webplotdigitizer. In case you decide to test it:

  1. run xwayland-satellite
  2. open webplotdigitizer and go to File > Load Image(s) > Choose File(s). Again, Filepicker should appear but it refuses to show up.

Still in niri, if you dbus-launch chromium or dbus-launch webplotdigitizer the Filepicker bug is gone.

On Hyprland, none of the aforementioned Filepicker problems happen.

Finnaly, and interestingly, after login-and-logout Hyprland if you comeback to niri, the Filepicker bug is gone. Everything works as expected without the need of dbus-launch.

EDIT: just booted a Fedora live iso, installed niri from Yalter's copr and confirmed chromium is affected by this file picker bug in niri. Firefox is not. To reproduce, open this site

https://ps.uci.edu/~franklin/doc/file_upload.html

and try to upload a file.

abdeoliveira commented 2 days ago

Not sure if it is related, but I can not share my entire screen in both Chromium and Firefox after login-logout Hyprland and then login on niri.

jjramsey commented 2 days ago

I can't reproduce your problem. What's your output from running pacman -Q | grep xdg-desktop-portal?

abdeoliveira commented 2 days ago

I can't reproduce your problem.

What did you try exactly?

What's your output from running pacman -Q | grep xdg-desktop-portal?

xdg-desktop-portal 1.18.4-1 xdg-desktop-portal-gnome 47.1-1 xdg-desktop-portal-gtk 1.15.1-2

jjramsey commented 1 day ago

What did you try exactly?

I tried opening webplotdigitizer from a terminal and doing "File > Load Image(s) > Choose File(s)". My file picker dialog shows up.

abdeoliveira commented 1 day ago

It seems it is a specific problem with my niri install. I gave up on debugging this and just applied a dirty workaround, launching webplotdigitizer trough dbus-launch. Also, switched from Chromium to Firefox.