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

Hello Brian & Oleg,

Brian Cully <bjc@spork.org> skribis:

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

Yeah, and similarly with the scenario Oleg describes.

> This does presume the Shepherd can be started multiple times for a given
> user,

No no, but it assumes simple scenarios: when you first login locally, X
is not running yet, but you eventually start it and that’s the display
you want your services to use.  Anything beyond that won’t work, as you
point out.

A simple improvement would be to stop the service when the relevant
/tmp/.X11-unix socket disappears.

As for which display to use when several are available (the SSH example
above), I don’t know.  Apparently elogind doesn’t know which display
corresponds to a “seat”.  Maybe we shouldn’t try to guess and instead
let users specify it, for instance with ‘herd start x11-display :42’?

Now, without this service the situation is even worse: shepherd and its
sub-processes inherit whatever ‘DISPLAY’ value was in its environment,
if any, and that’s it.  This service is a hack, but might still do more
good than harm?

Ludo’.




  parent reply	other threads:[~2023-09-14 20:40 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
2023-09-14 20:38     ` Ludovic Courtès [this message]
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=87msxo5w2x.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=65343@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=bjc@spork.org \
    --cc=go.wigust@gmail.com \
    --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).