unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* DBus with SDDM, Sway, and optionally fish
@ 2021-03-18  3:26 Sébastien Lerique
  2021-03-18  4:21 ` Joshua Branson
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Lerique @ 2021-03-18  3:26 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-22  0:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18  3:26 DBus with SDDM, Sway, and optionally fish Sébastien Lerique
2021-03-18  4:21 ` Joshua Branson
2021-03-22  0:55   ` Sébastien Lerique

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).