You are not logged in.

#1 2019-08-20 14:56:47

daanjderuiter
Member
Registered: 2016-12-28
Posts: 44

[SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

I recently left behind i3 to give SwayWM a try, and have been liking it so far. One thing I did run into, was one of my beloved applications, KDEConnect, suddenly not working anymore. Trying to run any kdeconnect-cli command would give me something like the following:

$ kdeconnect-cli -l
error activating kdeconnectd: QDBusError("", "")
error: Process org.kde.kdeconnect received signal 6

So apparently I am running into an issue with DBus. Now, I am not familiar enough with GNU/Linux to fully understand in what way DBus works, how it starts and how it fails here. What I do know is that multiple DBus-related processes are running, including dbus-daemon:

$ ps auxf | grep dbus
dbus       933  0.4  0.0  11912  4792 ?        Ss   Aug19  11:12 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
daan      1279  0.0  0.0  10384  3400 ?        Ss   Aug19   0:00  \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
daan     18099  0.0  0.0   7068   200 tty1     S+   Aug19   0:00 dbus-launch --sh-syntax --exit-with-session sway
daan     18100  0.0  0.0  11396  3164 ?        Ss   Aug19   0:00 /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session
daan     18248  0.0  0.0  10384  3384 ?        S    Aug19   0:00  \_ /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3

You may have notices one line mentioning Sway, and that is because I followed the advice on the Sway wiki FAQ and included that command to my profile, which is how I launch Sway without the need for a login manager:

$ cat ~/.zprofile
if [[ $XDG_VTNR -eq 1 ]]; then
	exec dbus-launch --sh-syntax --exit-with-session sway
fi

But unfortunately this is to no avail. Could someone with more knowledge of how DBus works chip in on this issue?

Last edited by daanjderuiter (2019-08-21 13:07:37)

Offline

#2 2019-08-21 08:19:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,714

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

Remove this line and just exec sway, the FAQ tells you this is needed in situations where you do not have logind available, which is not the case given that you are still running systemd.

Offline

#3 2019-08-21 08:32:17

daanjderuiter
Member
Registered: 2016-12-28
Posts: 44

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

I tried both, it doesn't affect the issue at hand

Offline

#4 2019-08-21 13:07:01

daanjderuiter
Member
Registered: 2016-12-28
Posts: 44

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

Slapping dbus-launch in front of every kdeconnect-cli command fixes this particular issue. Annoying thing is that many of the associated GUI applications related to KDEConnect fail in a similar way forcing me to create custom .desktop files. Nevertheless, I consider this issue solved.

Last edited by daanjderuiter (2019-08-21 13:07:51)

Offline

#5 2019-08-21 13:11:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,714

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

This isn't a good idea, you should have one global dbus session for your entire user session. The fact that you'd have to do this points to improper session setup, and you might run into many more similar issues unless you fix the root cause

Offline

#6 2019-08-21 15:17:02

snakeroot
Member
Registered: 2012-10-06
Posts: 164

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

Are you certain that the kdeconnectd daemon is started? I don't think sway runs anything in /etc/xdg/autostart. I was able to get kdeconnect-cli to connect by adding "exec /usr/lib/kdeconnectd" to ~/.config/sway/config. You can test this without changing your ~/.config/sway/config by running /usr/lib/kdeconnectd in another terminal and then running kdeconnect-cli.

Offline

#7 2019-08-21 15:31:14

daanjderuiter
Member
Registered: 2016-12-28
Posts: 44

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

That's definitely a way better solution, thanks.

Offline

#8 2019-08-21 16:08:11

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: [SOLVED] Issue regarding DBus, SwayWM, and KDEConnect

If you want to keep using XDG Autostart, then you can run dex


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB