help-guix
[Top][All Lists]
Advanced

[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: https://gitlab.com/wehlutyk/guix-config/-/blob/master/config.scm - main profile: https://gitlab.com/wehlutyk/guix-config/-/blob/master/sl-manifest.scm
- dot files: https://gitlab.com/wehlutyk/dotfiles

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 https://github.com/sddm/sddm/blob/master/data/scripts/wayland-session , 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` ( https://gitlab.com/wehlutyk/dotfiles/-/blob/master/.profile#L9 ), 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: https://gitlab.com/wehlutyk/guix-config/-/commit/5105ab1bea7f8233de5dffc053f794ae69822acd

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,
Sébastien



reply via email to

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