hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

[ERROR] - dbus: failed to connect to user bus: No such file or directory #27

Closed fahimscirex closed 1 year ago

fahimscirex commented 1 year ago

Telegram, Waybar, Firefox taking too much time to open, they works fine when I remove xdg-desktop-portal. I'm on Artix runit, so systemd isn't involved anywhere.

➜  ~ /usr/lib/xdg-desktop-portal-hyprland
2023/02/24 16:41:23 [ERROR] - dbus: failed to connect to user bus: No such file or directory
## ~/.config/hypr/hyprland.conf
...
exec-once = ~/.config/hypr/scripts/xdg-desktop-portal
exec-once = dbus-update-activation-environment --all
exec-once = ~/.config/hypr/scripts/gtktheme
...
## ~/.bash_profile
...
if [[ -z $WAYLAND_DISPLAY && $(tty) = "/dev/tty1" ]]; then
        eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
        export SSH_AUTH_SOCK
        exec dbus-launch Hyprland >/dev/null 2>&1
fi
...
vaxerski commented 1 year ago

exec dbus-launch Hyprland >/dev/null 2>&1

what if you don't dbus-launch?

fahimscirex commented 1 year ago

exec dbus-launch Hyprland >/dev/null 2>&1

what if you don't dbus-launch?

same result

vaxerski commented 1 year ago

well generally this looks like an issue with your dbus, not xdph / xdp

fahimscirex commented 1 year ago

well generally this looks like an issue with your dbus, not xdph / xdp

any suggestions or possible workaround?

vaxerski commented 1 year ago

No clue. I just use sysd like a normal human being lol

xrtxn commented 1 year ago

I use artix openrc and it works fine

erikeah commented 1 year ago

@fahimscirex Try on your init script to set dbus-launch Hyprland, I proudly enjoy Artix Openrc and Greetd and it works. ;)

bmariuszb commented 1 year ago

I also use Artix(runit) I did just dbus-lauch Hyprland, then opened kitty and executed

/usr/lib/xdg-desktop-portal-hyprland

The output

2023/06/18 18:56:36 [ERROR] - pipewire: couldn't connect to context
2023/06/18 18:56:36 [ERROR] - xdpw: failed to initialize screencast
'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:349 loop_leave()

Try if it works the same way for you, if it does, then probably something is running in the wrong order.

erikeah commented 1 year ago

xdg-desktop-portal-hyprland should be automatically started; dbus-launch Hyprland from your desktop manager / greeter (SDDM, greetd, GDM...) almost every one uses desktop files to describe desktop options, or in case of greetd use a predefined option.

Also, take in mind that you will need to start pipewire and wireplumber at startup, use exec-once from hyprland config file.

vaxerski commented 1 year ago

closing due to the v1.0 rewrite