[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DBus with SDDM, Sway, and optionally fish

From: Sébastien Lerique
Subject: DBus with SDDM, Sway, and optionally fish
Date: Thu, 18 Mar 2021 12:26:08 +0900

Dear all,

I use SDDM with (display-server "wayland"), and Sway as my main window manager.

My current configuration files are here:
- system configuration: - main profile:
- dot files:

I've been struggling to get the DBUS_SESSION_BUS_ADDRESS variable to be set by SDDM, as it does not seem to set it by default. The current script that SDDM runs before starting Sway is , and I haven't found any other setup step which might be a source for enviroment variables inside Sway.

(Somehow environment variables set in `.config/environment.d/*.conf` also get set, but I don't know how or where that happens.)

In the default configuration, DBUS_SESSION_BUS_ADDRESS is therefore not set inside Sway, which leads to a number of problems (e.g. nautilus can't read the Trash system).

One can set the value of DBUS_SESSION_BUS_ADDRESS produced by `dbus-launch --sh-syntax` in `.profile` ( ), which is then sourced by `wayland-session` if the shell is bash. In my case my shell is fish, and the way `wayland-session` calls fish doesn't make it export the variables exported by `.profile`. For that a small patch to `wayland-session` works, which I ended up using:

With the two changes above (setting DBUS_SESSION_BUS_ADDRESS in .profile, and patching wayland-session), apps can connect to dbus inside Sway. But this seems extremely hacky. Is there maybe a better way to make sure SDDM+Sway(+fish) is set up properly as a desktop enviroment? Is it time to make a `sway-desktop-service-type`?

Happy hacking,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]