I am using Hyprland with wofi to run apps.
When I open nautilus using wofi, it cannot find any app to open files (except VLC, for some reason I have no clue why). If I go to the “Open With…” dialog, only VLC is present.
Apparently, this is due to the PATH env var missing in dbus, since if I do dbus-update-activation-environment PATH then nautilus works as expected.
Is there something that I am missing to make this work without having to explicitly import PATH?
Actually, it looks like Hyprland does call dbus-update-activation-environment, it just does not include PATH and XDG_DATA_DIRS, which are necessary for application launchers and file associations.
Thanks! I don’t know how I missed those two issues.
I was a bit afraid that passing PATH to dbus was not the proper thing to do, but if it is ok, then I’ll just do that. Thanks!
Actually, I just noticed that you said “But if you do not use a display manager, you will need to call it yourself.”.
I do use GDM, so it should do that for me?
I meant that if your desktop environment does not do it and you use display manager, you can use services.xserver.updateDbusEnvironment NixOS option to have the session script generated by the display manager NixOS module do it for you.
I have sway configured via Home-manager.
I’ve tried running dbus-update-activation-environment --systemd --all from a terminal and then start nautilus, it can’t find much mimetypes mappings.
What puzzles me is that gio launched from a terminal seems to find libreoffice (writer.desktop)