unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Sébastien Lerique" <sl@eauchat.org>
To: help-guix@gnu.org
Subject: DBus with SDDM, Sway, and optionally fish
Date: Thu, 18 Mar 2021 12:26:08 +0900	[thread overview]
Message-ID: <87o8fhcfcf.fsf@eauchat.org> (raw)

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	other threads:[~2021-03-18  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  3:26 Sébastien Lerique [this message]
2021-03-18  4:21 ` DBus with SDDM, Sway, and optionally fish Joshua Branson
2021-03-22  0:55   ` Sébastien Lerique

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8fhcfcf.fsf@eauchat.org \
    --to=sl@eauchat.org \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).