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.)
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.