GNU bug report logs - #78258
[PATCH] services: xorg: Make startx respect XDG_VTR.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Mon, 5 May 2025 10:05:02 UTC

Severity: normal

Tags: patch

Done: Sergey Trofimov <sarg <at> sarg.org.ru>

To reply to this bug, email your comments to 78258 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#78258; Package guix-patches. (Mon, 05 May 2025 10:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 05 May 2025 10:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] services: xorg: Make startx respect XDG_VTR.
Date: Mon,  5 May 2025 12:04:28 +0200
To allow X server to be started by shepherd, without resorting to login
managers, the determine-vty procedure has to be adjusted. Shepherd would
as set /proc/self/fd/0 to /dev/null when starting the service, so the
TTY has to be extracted by other means.

* gnu/services/xorg.scm (xorg-start-command-xinit): Use XDG_VTR
environment variable to determine VTY.

Change-Id: I390217e292f6534b31d18083c9a49c009a836aad
---
 gnu/services/xorg.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index bef05b9bb9..d5d7ffbc4c 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -451,13 +451,17 @@ (define* (xorg-start-command-xinit #:optional (config (xorg-configuration)))
                        (eq? 'socket (stat:type (stat sock-file)))))
                   (determine-unused-display (+ n 1))
                   (format #f ":~a" n))))
-          (define (determine-vty)
+
+          (define (vty-from-fd0)
             (let ((fd0 (readlink "/proc/self/fd/0"))
                   (pref "/dev/tty"))
               (if (string-prefix? pref fd0)
-                  (string-append "vt" (substring fd0 (string-length pref)))
+                  (substring fd0 (string-length pref))
                   (error (format #f "Cannot determine VT from: ~a" fd0)))))
 
+          (define (determine-vty)
+            (string-append "vt" (or (getenv "XDG_VTNR") (vty-from-fd0))))
+
           (define (enable-xauth server-auth-file display)
             ;; Configure and enable X authority
             (or (getenv "XAUTHORITY")

base-commit: 17119f1a35b7bff683f2f8f2b5db09b4634283e6
prerequisite-patch-id: f9cc903b8048c8c6fde576fbf38ab110263020e3
prerequisite-patch-id: b6d30068ce4971d4d8e67517229916df4e76c529
prerequisite-patch-id: a7d0b89bff79773111c364edcd67265df55a0234
prerequisite-patch-id: c99e71b3eaa726b8ecf2d9b782d5a6a51476e702
prerequisite-patch-id: a3f8e48f417d7a17d9db12e950354a0220dc52f3
prerequisite-patch-id: 8456c216a2d8dd3d6c403243c0d9452fbb138ecf
prerequisite-patch-id: 95bb686bc7dc0961b89a2900a368f270de065d94
prerequisite-patch-id: f56033bf148a2fdfb5d9321315bdff877ebdb7ba
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78258; Package guix-patches. (Mon, 02 Jun 2025 13:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 78258 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 78258 <at> debbugs.gnu.org
Subject: Re: [bug#78258] [PATCH] services: xorg: Make startx respect XDG_VTR.
Date: Mon, 02 Jun 2025 15:20:57 +0200
pushed as eaa0987a301ed5c5111c2dc2286039051879b50a




bug closed, send any further explanations to 78258 <at> debbugs.gnu.org and Sergey Trofimov <sarg <at> sarg.org.ru> Request was from Sergey Trofimov <sarg <at> sarg.org.ru> to control <at> debbugs.gnu.org. (Mon, 02 Jun 2025 13:22:02 GMT) Full text and rfc822 format available.

This bug report was last modified 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.