You are not logged in.
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
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
I tried both, it doesn't affect the issue at hand
Offline
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
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
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
That's definitely a way better solution, thanks.
Offline
If you want to keep using XDG Autostart, then you can run dex
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline