hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.88k stars 752 forks source link

systemd,dbus: import PATH XDG_DATA_DIRS variables into systemd and dbus session #6640

Closed JohnRTitor closed 5 days ago

JohnRTitor commented 6 days ago

Describe your PR, what does it fix/add?

When opening links from a browser that would otherwise open in another app present in the system, it fails to find the app. This is because PATH is not imported into systemd/dbus.

We are currently using a workaround in NixOS to explicitly define the systemd environment PATH, but ideally it should be set by the Window manager/DE at login.

An open issue highlighted this for the past one year #2800 and several threads (ie. on discourse) on the internet have popped up asking the user to manually import PATH. Lets not hold this any longer and let this issue die in peace.

In addition to PATH, XDG_DATA_DIRS should be imported as well, due to it containing useful things like desktop files.

This issue affects flatpak apps as well.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This is backwards compatible.

Is it ready for merging, or does it need work?

Ready. I am using the patch on NixOS and it works.