unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Cully via Guix-patches via <guix-patches@gnu.org>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: paren@disroot.org, "Ludovic Courtès" <ludo@gnu.org>,
	65343@debbugs.gnu.org, "Andrew Tropin" <andrew@trop.in>
Subject: [bug#65343] [PATCH] home: services: Add 'x11-display' service.
Date: Wed, 16 Aug 2023 16:55:05 -0400	[thread overview]
Message-ID: <87a5uqwvva.fsf@spork.org> (raw)
In-Reply-To: <877cpuernh.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 16 Aug 2023 22:03:30 +0300")

The largest issue I see with this patch is that it doesn't correlate the
X11 socket with the session being used in cases where there's more than
one X11 display.

If, for instance, I start an X session on the console, allocating the
first display (:0), everything will start up correctly. If I then log in
from a remote host with SSH using X forwarding, I'll get another display
allocated (:1), but this isn't accounted for. If I do these operations
in reverse, first starting my X-forwarded SSH session, then logging in
via console, it will almost certainly not do what just about anyone
wants.

This does presume the Shepherd can be started multiple times for a given
user, and run concurrently, though this does not appear to actually be
the case, since there's a single global location for the socket, which
isn't differentiated by session. But that's a separate issue.

This also doesn't handle the case of the X11 server going away, either
by crash or user request. If we're starting stuff on behalf of users
when it comes up, it seems to me we should also be stopping stuff on
users' behalf when it comes down. The lack of handling this could easily
lead to resource-churning loops where X11 goes away, but Shepherd
services continuously restart themselves trying to connect to a display
that no longer exists.

If this is only meant to be used when using a display manager, a la gdm,
then it might be ok. I'm not sure, since I don't use them. When logging
out of an X session started from gdm, is the user's shepherd process
stopped? Is it stopped gracefully? What about sddm? lightdm?




  reply	other threads:[~2023-08-16 20:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 17:43 [bug#65343] [PATCH] home: services: Add 'x11-display' service Ludovic Courtès
2023-08-16 19:03 ` Oleg Pykhalov
2023-08-16 20:55   ` Brian Cully via Guix-patches via [this message]
2023-09-05 12:00     ` Andrew Tropin
2023-09-14 20:38     ` Ludovic Courtès
2023-09-14 22:39       ` Oleg Pykhalov
2023-10-20 21:09         ` [bug#65343] [PATCH v2] " Ludovic Courtès
2023-11-03 16:58           ` Oleg Pykhalov
2023-11-05 22:30             ` Ludovic Courtès

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=87a5uqwvva.fsf@spork.org \
    --to=guix-patches@gnu.org \
    --cc=65343@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=bjc@spork.org \
    --cc=go.wigust@gmail.com \
    --cc=ludo@gnu.org \
    --cc=paren@disroot.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).