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

[-- Attachment #1: Type: text/plain, Size: 2204 bytes --]

On 2023-08-16 16:55, Brian Cully wrote:

> 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?

I have been seeking for the solution for this for some time and also
tried similiar thing as Ludo's patch does and I'm agree with concerns
mentioned above by Brian.

At the end in rde we decided to start shepherd by Sway (wayland
compositor), so all the services have proper environment variables.  It
has other downsides, but overall works well for usual desktop use cases.

I don't have a complete generic answer to this problem yet.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2023-09-05 12:01 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
2023-09-05 12:00     ` Andrew Tropin [this message]
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=87o7igzv6u.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=65343@debbugs.gnu.org \
    --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).