nix-flatpak icon indicating copy to clipboard operation
nix-flatpak copied to clipboard

fix(dbus): No medium found

Open sofiedotcafe opened this issue 1 year ago • 5 comments

https://github.com/NixOS/nixpkgs/issues/183629 Should fix #65

sofiedotcafe avatar May 03 '24 19:05 sofiedotcafe

Noticed that this is the same error I had in my own flake. Fixed it with this ^-^

sofiedotcafe avatar May 03 '24 19:05 sofiedotcafe

hey @jh-devv - thanks for this!

I tried to replicate #65, but I don't see any dbus errors on any of my test envs. I use Gnome, and DBUS_SESSION_BUS_ADDRESS is set:

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus,guid=01b38efe8192276454507e05663647ae

On my systems, the variable is set by the systemd dbus.service unit. It is then imported by my session manager (GDM).Could you maybe check the output of:

systemctl status --user dbus.service

I can see how manually setting DBUS_SESSION_BUS_ADDRESS will fix your issue, but I am not sure if an home-manager's activation script is the right place to declare that variable.

If anything, I would suggest checking that DBUS_SESSION_BUS_ADDRESS is already set before (re)exporting it.

Maybe your session manager, or shell's profile config, could be a better place for exporting the variable?

gmodena avatar May 04 '24 19:05 gmodena

Maybe your session manager, or shell's profile config, could be a better place for exporting the variable?

Maybe, though, it is set?

Maybe something weird with Hyprland?

sofiedotcafe avatar May 07 '24 17:05 sofiedotcafe

Maybe, though, it is set? Maybe something weird with Hyprland?

mmm... could be? Unfortunately I am not familiar with hyperland. If you echo DBUS_SESSION_BUS_ADDRESS on a fresh install, is the variable set at all ?

If I understand your bug report correctly, unix:path=/run/user/$UID/bus existed in your system after boot, and you did not manually have the create the session. Is this right?

gmodena avatar May 11 '24 12:05 gmodena

Starting Hyprland via an systemd service seemed to fix this?

sofiedotcafe avatar May 13 '24 08:05 sofiedotcafe

Closing this MR, since it seems more appropriate to configure (global) dbus state outside of an activation script. If other folks reports similar issues, we can add documentation / pointers to the project.

gmodena avatar Aug 19 '24 19:08 gmodena