unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 65343@debbugs.gnu.org, Brian Cully <bjc@spork.org>
Subject: [bug#65343] [PATCH v2] home: services: Add 'x11-display' service.
Date: Fri, 03 Nov 2023 19:58:29 +0300	[thread overview]
Message-ID: <87lebekc3u.fsf@gmail.com> (raw)
In-Reply-To: <c423ece09843ab3ac580c2182e9628f067902f03.1697835966.git.ludo@gnu.org> ("Ludovic Courtès"'s message of "Fri, 20 Oct 2023 23:09:57 +0200")

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

Hi Ludovic,

apologize for the slow response. I had some minor issues with setting a
'home shepherd' instance in a fresh testing virtual machine (not related
to the current issue).

Ludovic Courtès <ludo@gnu.org> writes:

> * gnu/home/services/desktop.scm (x11-shepherd-service): New procedure.
> (home-x11-service-type): New variable.
> (redshift-shepherd-service): Add 'requirement' field.
> (home-redshift-service-type): Extend 'home-x11-service-type'.
> * doc/guix.texi (Desktop Home Services): Document it.
> ---
>  doc/guix.texi                 | 34 ++++++++++++++
>  gnu/home/services/desktop.scm | 87 +++++++++++++++++++++++++++++++++--
>  2 files changed, 116 insertions(+), 5 deletions(-)
>
> Changes in this version:
>
>   1. ‘x11-display’ defaults to the ‘DISPLAY’ value of the ‘shepherd’
>      process, if any.  This makes it fully compatible with what we
>      have now (processes basically inherit environment variables of
>      the ‘shepherd’ process).
>
>   2. One can specify a display: ‘herd start x11-display :42’.
>
> WDYT?

I think we are going in the right direction, thank you for the
implementation!


During testing in a virtual machine I found an issue, which could be
reproduced with the steps bellow. It's not an emergency issue which
blocks the patch from merging, because we still have a workaround in our
pocket (stop and start ‘shepherd’ manually on a specific ‘DISPLAY’).

- start ‘shepherd’ manually on ‘127.0.0.1:5’ by typing ‘shepherd’ in a
  GUI terminal;
- stop ‘x11-display’ with ‘herd stop x11-display’;
- start ‘x11-display’ with ‘herd start x11-display :1’;
- start ‘redshift’ with ‘herd start redshift’.

The ‘redshift’ service starts a ‘redshift’ process.  The
/proc/REDSHIFT_PID/environ file has a ‘DISPLAY’ variable setted to
‘127.0.0.1:5’.

I expect that in /proc/REDSHIFT_PID/environ file the value of ‘DISPLAY’
environment variable should be ‘:1’, as in ‘x11-display’ service started
right before the ‘redshift’ service.

Following services could be used to get ‘:1’ and ‘127.0.0.1:5’:
--8<---------------cut here---------------start------------->8---
    (service lxqt-desktop-service-type)

    (service xvnc-service-type (xvnc-configuration
                                 (display-number 5)
                                 (localhost? #f)
                                 (xdmcp? #t)
                                 (inetd? #t)))

    (modify-services %desktop-services
                     (gdm-service-type config => (gdm-configuration
                                                  (inherit config)
                                                  (auto-suspend? #f)
                                                  (xdmcp? #t))))
--8<---------------cut here---------------end--------------->8---

A workaround for this issue to stop ‘shepherd’ with ‘herd stop root’,
and start it on ‘:1’ with ‘shepherd’ in a GUI terminal.


Regards,
Oleg.

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

  reply	other threads:[~2023-11-03 16:59 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
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 [this message]
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=87lebekc3u.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=65343@debbugs.gnu.org \
    --cc=bjc@spork.org \
    --cc=ludo@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.
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).