emersion / mako

A lightweight Wayland notification daemon
https://wayland.emersion.fr/mako
MIT License
2.17k stars 137 forks source link

Failed to connect to user bus: No such file or directory (2) #505

Closed o0nd7ots closed 5 months ago

o0nd7ots commented 5 months ago

Hello. I know my issue is related to #88, but I'll try to make what is happening clearer. I want either this to be fixed or other Gentoo users to be better educated what they have this problem, as las

I am running a Gentoo system on OpenRC wirh elogind.

Right now when I try to launch mako I get the title message.

When I strace it, I get this:

[...]
munmap(0x7f42f70e9000, 128748)          = 0
getrandom("\x8c\x3b\x01\xda\xf8\x6b\xad\xd2", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5616076b9000
brk(0x5616076da000)                     = 0x5616076da000
futex(0x7f42f6f19658, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f42f6f19658, FUTEX_WAKE_PRIVATE, 2147483647) = 0
prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1
prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
access("/home/user/.mako/config", R_OK) = -1 ENOENT (No such file or directory)
access("/home/user/.config/mako/config", R_OK) = -1 ENOENT (No such file or directory)
getpid()                                = 19124
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
getsockopt(3, SOL_SOCKET, SO_RCVBUF, [212992], [4]) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [8388608], 4) = 0
getsockopt(3, SOL_SOCKET, SO_RCVBUF, [425984], [4]) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
getsockopt(3, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(3, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
setsockopt(3, SOL_SOCKET, SO_SNDBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
connect(3, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, 21) = -1 ENOENT (No such file or directory)
close(3)                                = 0
write(2, "Failed to connect to user bus: N"..., 57Failed to connect to user bus: No such file or directory
) = 57
exit_group(1)                           = ?
+++ exited with 1 +++

I have the /run/user/1000/ path, but there is no bus here indeed.

Here are the use flags for mako:

$ equery uses gui-apps/mako
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
 * Found these USE flags for gui-apps/mako-1.8.0:
 U I
 + + elogind : Enable session tracking via sys-auth/elogind
 + + icons   : Enable support for icons
 - - systemd : Enable use of systemd-specific libraries and features like socket activation or session tracking

Also sys-apps/dbus-1.15.8 hasn't got a user-session flag.

o0nd7ots commented 5 months ago

This is not a mako problem, as I suspected.

I solved this by running my window manager not as WM_COMMAND but as dbus-launch --exit-with-session WM_COMMAND.