help-guix
[Top][All Lists]
Advanced

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

Re: Launching sway from sddm


From: Denis 'GNUtoo' Carikli
Subject: Re: Launching sway from sddm
Date: Sun, 26 Jun 2022 00:54:57 +0200

On Fri, 24 Jun 2022 18:03:03 +0100
"(" <paren@disroot.org> wrote:
> On Fri Jun 24, 2022 at 5:21 PM BST, Denis 'GNUtoo' Carikli wrote:
> > - Where is XDG_RUNTIME_DIR supposed to be set?
[...]
> (1) SDDM does not support seatd, only elogind:

I've tried to workaround XDG_RUNTIME_DIR with a hack:
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -1173,6 +1173,8 @@ (define (operating-system-environment-variables
> os) ;; when /etc/machine-id is missing.  Make sure these warnings are
> non-fatal. ("DBUS_FATAL_WARNINGS" . "0")
>  
> +    ("XDG_RUNTIME_DIR" . "/run/user/1000")
> +
>      ;; XXX: Normally we wouldn't need to do this, but our glibc@2.23
> package ;; used to look things up in 'PREFIX/lib/locale' instead of
>      ;; '/run/current-system/locale' as was intended.  Keep this hack
> around so

And that now gives the following .local/share/sddm/wayland-session.log:
> 00:00:00.118 [ERROR] [wlr] [libseat] [libseat/backend/logind.c:317] Could not 
> activate session: Interactive authentication required.
> 00:00:00.118 [ERROR] [wlr] [libseat] [libseat/libseat.c:79] No backend was 
> able to open a seat
> 00:00:00.118 [ERROR] [wlr] [backend/session/session.c:84] Unable to create 
> seat: Function not implemented
> 00:00:00.118 [ERROR] [wlr] [backend/session/session.c:218] Failed to load 
> session backend
> 00:00:00.118 [ERROR] [wlr] [backend/backend.c:353] Failed to start a DRM 
> session
> 00:00:00.118 [ERROR] [sway/server.c:53] Unable to create backend

And I also retried with sddm+seatd+manual-seatd instead of
sddm+elogind+manual-seatd and rebooted after that, and it didn't work so
I might have tested that wrong. The later still work though.

The first error is from libseat which is used by wlroots which
is used by sway:
> static int session_activate(struct backend_logind *session) {
>         sd_bus_message *msg = NULL;
>         sd_bus_error error = SD_BUS_ERROR_NULL;
> 
>         // Note: the Activate call might not make the session active
>         // immediately
>         int ret = sd_bus_call_method(session->bus,
>                                      "org.freedesktop.login1",
>                                      session->path,
>                                      "org.freedesktop.login1.Session",
>                                      "Activate",
>                                      &error, &msg, "");
>         if (ret < 0) { 
>                 log_errorf("Could not activate session: %s",
>                            error.message);
>         }
> 
>         sd_bus_error_free(&error);
>         sd_bus_message_unref(msg);
>         return ret;
> }
For this one I could look if we have the right methods on the session
dbus.

The second one is from libseat_open:
> struct libseat *libseat_open_seat([...]) {
>         [...]
> 
>         char *backend_type = getenv("LIBSEAT_BACKEND");
It first tries to get the backend from the environment.

And then if no LIBSEAT_BACKEND is set, it goes try all the backends
and returns the first valid one or prints the error we have:
> for (const struct named_backend *iter = impls; 
>      iter->backend != NULL;> iter++) {
>         backend = iter->backend->open_seat(listener, data);
>         if (backend != NULL) {
>                 log_infof("Seat opened with backend '%s'",
>                           iter->name);
>         return backend;
> }
> [...]
> log_error("No backend was able to open a seat");
> [...]
> return NULL;

Denis.

Attachment: pgptHdXVbRBaV.pgp
Description: OpenPGP digital signature


reply via email to

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