From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 06 10:07:32 2024 Received: (at submit) by debbugs.gnu.org; 6 Jan 2024 15:07:33 +0000 Received: from localhost ([127.0.0.1]:60134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rM8Gq-00045z-BT for submit@debbugs.gnu.org; Sat, 06 Jan 2024 10:07:32 -0500 Received: from lists.gnu.org ([2001:470:142::17]:32998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rM8Go-00045l-1Q for submit@debbugs.gnu.org; Sat, 06 Jan 2024 10:07:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rM8Gd-0003dn-Fn for guix-patches@gnu.org; Sat, 06 Jan 2024 10:07:19 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rM8Ga-0005rP-G9 for guix-patches@gnu.org; Sat, 06 Jan 2024 10:07:19 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 413A2246305; Sat, 6 Jan 2024 15:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1704553633; bh=sG/9/+vKvhzXNypfAwUgTzXbjxvb59xBuzXBAJME6f4=; h=From:To:Cc:Subject:Date; b=oL0i83f5PDSX1zJhu6aCot3IVlCFw9m4qriiCM2mP12AwFFJqBNuvtmh0+Ozjidlz 4n7Cep9BniLJylqhHNzfXglB7M8PFfyQDbS2ZSGBxPsWAx1qp8NtVBXpWiPNn1P/i9 mr9OnrQ2Ltm5cMDNYlFgkRbt8VZnyAojJaCtax8VLQDqUKXqBU6Y4MFMLG8qFS5SHR cN24fgCK1F1W+iZNq8HdKqo2K6qu135wdNBAy9wlGTB0xLz9rTX8lQ6MmkbtDQY9yp U+xSC49QAPk+uK378UsWONExUukWSnCr9x+4rJBJlcTqVDmgUM+suo2x9zWb/8I2C6 XEwr3KZd0zV0BcG9EeCRXOEsHKtacjL2+RQv7X8gofwDUAn4ri5indmUyPbZa2zpb0 VdCR0rg5EfysnfQjCpXcKwYkOFxzH8RxTH/MaA3P/xU1Y6iNbY1M6q+XwtxTFNQTIL kGhBphqS0gYeDpdw2tWrwO1JoLz2OhK56tfe2pXHoREGAF3h1Oq/sl0GmvGjHxIpo/ Fkno8R43a+TC2jyfz8NwmCSF01/22m6PhoR7owJqK6SOr3FsrZHuRouJ6I6jwW8gWn eQQyTJ1eHEG2yv4VU4QvHZj9mUSLc34nhz2p8vPkG8cRr6SNwKFKdH/cIxSkDp7tNB pZ6+31Y8BCKlZEuGCJSSA7QU= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 538182448D7; Sat, 6 Jan 2024 15:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1704553632; bh=sG/9/+vKvhzXNypfAwUgTzXbjxvb59xBuzXBAJME6f4=; h=From:To:Cc:Subject:Date; b=f6wRG1YuNjiUPi9mF0RALvYdbrqYKztgb3Tjsw6Khdx7XM8u5oq6Q1VI9u/vrrg13 ELHMF9mOCWnwyxjJmrQkPChzgq4Oeq/XnNX9IjoYre+eZk4q+vdHs9XZ5h4h69w8mA UxuxJNsjv/+jUPayw0Vd08T8KS6amyPRWe6JqpMTnRwMeuVpxsSUmcUe2U49HrocsP B5fEi9OnHocBTEiKGmXKpYI535ntQulvkYcWezQuIbnTFnCIDnCRDJVcshtkHLpSgI qC57U1SblzEQ2zYH7EDCUq3KGxg+K27A8R/RA26NPUlde10N8zTgbjLY2TmlDdwUBb yoBwTl06iqfZmnFEZXe0yH3Iu5hPj9l1F65UAmOaEJOaB8bz/0dmL5LodZSRKQht/b 9NfpjMOOqNcAnIdNukeuGUBtNLPzA8w+BUUSi55qv0ljyArtioScXr3gkh/+stJMBF p7ZWtLEyGj+aBv1t+fWEf4ZO6HX31VUMgeTtAQRP5yiw46QHyL56v2AQ6vxUTesG+a DIK6i1CBTiFs22MkFKCGO/LfP8/EGzfvmQQPxBuDISJ17/hiIcsbFoeSArZwc4UJ+v Y0aGt4SvIrDZ3uHqK5+gTSyajWuSp5ApV4IcmG9rJua/TQFFqhLbUvVuO3krolv5UQ HwC6DJkv3bqmvYlktJOVEjWk= From: Tomas Volf <~@wolfsden.cz> To: guix-patches@gnu.org Subject: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Date: Sat, 6 Jan 2024 16:07:09 +0100 Message-ID: <4fdf0d9993bb3375797ca807d894f66920bd81d2.1704553618.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) When user does not use any desktop environment, the typical sequence is to log in and then type `startx' into the tty to get a window manager running. Most distributions do provide startx by default, but Guix has only xorg-start-command, that is not suitable for this type of task. This commit adds second procedure, xorg-start-command-xinit, that correctly picks virtual terminal to use, sets up XAUTHORITY and starts xinit with correct arguments. That should make running Guix without any desktop environment more approachable. * gnu/services/xorg.scm (xorg-start-command-xinit): New procedure. (define-module): Export it. * doc/guix.texi (X Window): Document it. Change-Id: I17cb16093d16a5c6550b1766754700d4fe014ae9 --- doc/guix.texi | 18 ++++++++++ gnu/services/xorg.scm | 82 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index a648a106b3..72c5527270 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23177,6 +23177,24 @@ X Window Usually the X server is started by a login manager. @end deffn +@deffn {Procedure} xorg-start-command-xinit [config] +Return a @code{startx} script in which the modules, fonts, +etc. specified in @var{config}, are available. The result should be +used in place of @code{startx}. Compared to the +@code{xorg-start-command} it calls xinit, therefore it works well when +executed from tty. If you are using a desktop environment, you are +unlikely to have a need for this procedure. + +The resulting file should be invoked by user from the tty after login, +common name for the program would be @code{startx}. Convenience link +can be created by (for example) this home service: + +@lisp +(simple-service 'home-files home-files-service-type + `(("bin/startx" ,(xorg-start-command-xinit)))) +@end lisp +@end deffn + @defvar screen-locker-service-type Type for a service that adds a package for a screen locker or screen diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 1ee15ea90c..2f5aa3b4f3 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -53,6 +53,7 @@ (define-module (gnu services xorg) #:use-module (gnu packages gnome) #:use-module (gnu packages admin) #:use-module (gnu packages bash) + #:use-module (gnu packages linux) #:use-module (gnu system shadow) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) @@ -84,6 +85,7 @@ (define-module (gnu services xorg) xorg-wrapper xorg-start-command + xorg-start-command-xinit xinitrc xorg-server-service-type @@ -414,6 +416,86 @@ (define* (xorg-start-command #:optional (config (xorg-configuration))) (program-file "startx" exp)) +(define* (xorg-start-command-xinit #:optional (config (xorg-configuration))) + "Return a @code{startx} script in which the modules, fonts, etc. specified in +@var{config}, are available. The result should be used in place of +@code{startx}. Compared to the @code{xorg-start-command} it calls xinit, +therefore it works well when executed from tty." + (define X + (xorg-wrapper config)) + + (define exp + ;; Small wrapper providing subset of functionality of typical startx script + ;; from distributions like alpine. + #~(begin + (use-modules (ice-9 popen) + (ice-9 textual-ports)) + + (define (checked-system* . args) + (if (= 0 (status:exit-val (apply system* args))) + #t + (error "command failed"))) + + (define (capture-stdout . prog+args) + (let* ((port (apply open-pipe* OPEN_READ prog+args)) + (data (get-string-all port))) + (if (= 0 (status:exit-val (close-pipe port))) + (string-trim-right data #\newline) + (error "command failed")))) + + (define (determine-unused-display n) + (let ((lock-file (format #f "/tmp/.X~a-lock" n)) + (sock-file (format #f "/tmp/.X11-unix/X~a" n))) + (if (or (file-exists? lock-file) + (false-if-exception + (eq? 'socket (stat:type (stat sock-file))))) + (determine-unused-display (+ n 1)) + (format #f ":~a" n)))) + (define (determine-vty) + (let ((fd0 (readlink "/proc/self/fd/0")) + (pref "/dev/tty")) + (if (string-prefix? pref fd0) + (string-append "vt" (substring fd0 (string-length pref))) + (error (format #f "Cannot determine VT from: ~a" fd0))))) + + (define (enable-xauth server-auth-file display) + ;; Configure and enable X authority + (or (getenv "XAUTHORITY") + (setenv "XAUTHORITY" (string-append (getenv "HOME") "/.Xauthority"))) + + (let* ((bin/xauth (string-append #$xauth "/bin/xauth")) + (bin/mcookie (string-append #$util-linux "/bin/mcookie")) + + (mcookie (capture-stdout bin/mcookie))) + (checked-system* bin/xauth "-qf" server-auth-file + "add" display "." mcookie) + (checked-system* bin/xauth "-q" + "add" display "." mcookie))) + + (let* ((xinit (string-append #$xinit "/bin/xinit")) + (display (determine-unused-display 0)) + (vty (determine-vty)) + (server-auth-port (mkstemp "/tmp/serverauth.XXXXXX")) + (server-auth-file (port-filename server-auth-port))) + (close-port server-auth-port) + (enable-xauth server-auth-file display) + (apply execl + xinit + xinit + "--" + #$X + display + vty + "-keeptty" + "-auth" server-auth-file + ;; These are set by xorg-start-command, so do the same to keep + ;; it consistent. + "-logverbose" "-verbose" "-terminate" + #$@(xorg-configuration-server-arguments config) + (cdr (command-line)))))) + + (program-file "startx" exp)) + (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the base-commit: e994bc0abf39db228fa61f1aaf24840c19c47647 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 16 14:29:33 2024 Received: (at 68289) by debbugs.gnu.org; 16 Apr 2024 18:29:33 +0000 Received: from localhost ([127.0.0.1]:45014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwnYh-0003d9-Ds for submit@debbugs.gnu.org; Tue, 16 Apr 2024 14:29:33 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:33025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwnYf-0003cJ-2I for 68289@debbugs.gnu.org; Tue, 16 Apr 2024 14:29:30 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id B0A01240002; Tue, 16 Apr 2024 18:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1713292149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yuBusvqZ4wHFzTxpP51udoUcr7SZw7+C6jvRQYXo/5w=; b=VcoKj4HoobckWBgcwpxUZxk/MrrRmvpCkOcgrFWs1RUgp+Y2cptCBbyqRaVFciOy5kUG/s HHJ8kiHt+2oPzSjsl4y79SWXSNw35iLTP0WxOLcqQZNrl2ZFtEUf8QTh21p0Q1aA7rGDSy kqxwhyWZWwab473pJzQC3bNIMKIAjcJpD2jCJhmUjNLw3ZQ26G28DetDnAxLr9WoCjIbTA ABsz5GFTdL5C6Awz8VAFi+nJBAPYWnHoKkm2box3XtLL32q/4HSuNR453MmGccROnCyJ2/ 7XaE4rZrPqeMUw3VxFhvPz47mZPuqo3/TpuDcdDwLPkBJ40mJ5GWFwiG7fuSXw== From: Fabio Natali To: 68289@debbugs.gnu.org, ~@wolfsden.cz Subject: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Date: Tue, 16 Apr 2024 19:29:09 +0100 Message-ID: <87o7a9upoq.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: me@fabionatali.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68289 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Tomas, Thanks for patch 68289 re `xorg-start-command-xinit'. I think it'd be great to have a command like that in Guix. In a clumsy attempt to review the patch, I've compared it with the code for `startx' that I found here=E2=81=B0. My comments, including some general observations that might help other reviewers, follow. tl;dr: - I hope someone more Xorg savvy than me can have a look. - Other than a couple of questions (below), things look alright to me. - I haven't tested the patch on my system yet, but I plan to do it soon. Thanks, have a great day, Fabio. =E2=81=B0 https://gitlab.freedesktop.org/xorg/app/xinit/-/blob/master/start= x.cpp `(determine-unused-display n)' maps closely to this code block: ,---- | XCOMM Automatically determine an unused $DISPLAY | d=3D0 | while true ; do | [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break | d=3D$(($d + 1)) | done | defaultdisplay=3D":$d" | unset d `---- `(determine-vty)' is similar to the block below, but `startx' relies on the `tty' command from Coreutils. Do you think there might be any advantage in using it in `(determine-vty)'? A slight simplification perhaps? ,---- | #ifdef __linux__ | XCOMM When starting the defaultserver start X on the current tty to a= void | XCOMM the startx session being seen as inactive: | XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=3D806491" | tty=3D$(tty) | if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then | tty_num=3D$(echo "$tty" | grep -oE '[0-9]+$') | vtarg=3D"vt$tty_num -keeptty" | fi | #endif `---- `(enable-xauth server-auth-file display)' maps closely to: ,---- | XCOMM create a file with auth information for the server. ':0' is a d= ummy. | xserverauthfile=3D$HOME/.serverauth.$$ | trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM | xauth -q -f "$xserverauthfile" << EOF | add :$dummy . $mcookie | EOF | #if defined(__APPLE__) || defined(__CYGWIN__) | xserverauthfilequoted=3D$(echo ${xserverauthfile} | sed "s/'/'\\\\''/= g") | serverargs=3D${serverargs}" -auth '"${xserverauthfilequoted}"'" | #else | serverargs=3D${serverargs}" -auth "${xserverauthfile} | #endif | | XCOMM now add the same credentials to the client authority file | XCOMM if '$displayname' already exists do not overwrite it as another | XCOMM server may need it. Add them to the '$xserverauthfile' instead. | for displayname in $authdisplay $hostname$authdisplay; do | authcookie=3D`XAUTH list "$displayname" @@ | | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/= null; | if [ "z${authcookie}" =3D "z" ] ; then | XAUTH -q << EOF | add $displayname . $mcookie | EOF `---- The patch saves the server's auth file in `/tmp' whereas `startx' uses the home directory. I wonder if this might make any difference in terms of security. Related, how can we be sure that `(mkstemp "/tmp/serverauth.XXXXXX")' will be setting the right file permissions? Here's the two relevant bits: ,---- | (server-auth-port (mkstemp "/tmp/serverauth.XXXXXX")) | (server-auth-file (port-filename server-auth-port)) `---- ,---- | xserverauthfile=3D$HOME/.serverauth.$$ | trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM `---- Finally, on a purely cosmetic side, any reason to have `(define X (xorg-wrapper config))' outside the G-expression, while the other definitions are inside? --=20 Fabio Natali https://fabionatali.com From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 17 05:30:38 2024 Received: (at 68289) by debbugs.gnu.org; 17 Apr 2024 09:30:38 +0000 Received: from localhost ([127.0.0.1]:45767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1ck-0002Kh-3j for submit@debbugs.gnu.org; Wed, 17 Apr 2024 05:30:38 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:49539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1cg-0002Je-33 for 68289@debbugs.gnu.org; Wed, 17 Apr 2024 05:30:36 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1A77CE000C; Wed, 17 Apr 2024 09:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1713346213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TLFXEjv+L7/PS9f2Og+mShoop5r8I488wBGH+tfjmZg=; b=dZ9ZIBLOcEPayF6ePqDNKDwB8mLg+acPtBLOP9CtH2NGxw5NdZ+IWlwScJTIw4kPIJ19HC TojJsFUQ/0PkZHYQy6VUIvsltle4zaWAUBLO/G3ZfOoK0yu5W0t7QKQaXF+4EXsNsnWZWP A0HmhsMLRI2TqDD+MEw8InctOXJizn8numkw7DmImC+jAVinrAfoppYQKCt6pINbpQVKsk T6IeK6ImnJa/VzRlXLxgR8KB78QHfldaQR8dokYrn6oUx04TsYkBPAnOShu1PwXOtJJ5sp ICtzUnFbq5J3XObwqQ5YU/OhfhJeKPfLx4R73k+HPqDUp/SL0I4clEskSV+FUA== From: Fabio Natali To: 68289@debbugs.gnu.org, ~@wolfsden.cz Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: <87o7a9upoq.fsf@fabionatali.com> References: <87o7a9upoq.fsf@fabionatali.com> Date: Wed, 17 Apr 2024 10:30:12 +0100 Message-ID: <87r0f4l4kb.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: me@fabionatali.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68289 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, a quick follow-up on a couple of points. On 2024-04-16, 19:29 +0100, Fabio Natali wrote: > - I haven't tested the patch on my system yet, but I plan to do it > soon. I've tested the patch and it works as expected on my system. > `(determine-vty)' is similar to the block below, but `startx' relies > on the `tty' command from Coreutils. Do you think there might be any > advantage in using it in `(determine-vty)'? A slight simplification > perhaps? Looking into this more closely, the `tty' command wouldn't be a simplification. It might be a bit more consistent with other parts of the patch and it'd abstract away the hardcoded `/proc/self/fd/0', but probably not worth the change? > The patch saves the server's auth file in `/tmp' whereas `startx' uses > the home directory. I wonder if this might make any difference in > terms of security. Related, how can we be sure that `(mkstemp > "/tmp/serverauth.XXXXXX")' will be setting the right file permissions? I see the reason why we want to use `/tmp', as otherwise the number of stale `serverauth.XXXXXX' files would grow indefinitely. Using `/tmp', at least we know they'll be garbage collected at every reboot. Any way to emulate `startx' and use some sort of `trap' to remove the file on exit? > Finally, on a purely cosmetic side, any reason to have `(define X > (xorg-wrapper config))' outside the G-expression, while the other > definitions are inside? Oh yes, the `(define X ...)' has to be outside the G-expression, of course. The security aspect (in relation to the server auth file, its permissions and location) is the only remaining point where I'd like an extra pair of eyes. The rest of the patch LGTM. There's a couple of microscopic formatting issues (e.g. an occurrence of tty where I'd write TTY instead), I'll list them all in a follow-up. Thanks, best wishes, Fabio. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 14:46:20 2024 Received: (at 68289) by debbugs.gnu.org; 18 Apr 2024 18:46:20 +0000 Received: from localhost ([127.0.0.1]:54003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxWm4-0000JZ-5s for submit@debbugs.gnu.org; Thu, 18 Apr 2024 14:46:20 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:54043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxWm1-0000IO-RT for 68289@debbugs.gnu.org; Thu, 18 Apr 2024 14:46:18 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id DE94EE0005; Thu, 18 Apr 2024 18:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1713465957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MfEYJFOjAmOEdmjQb4i8Pj1ZDDZjIYN6ZZngg3rc07g=; b=dcALD77EJv5jMKJIWcDRR7AoRkRaXTyQEZfg4eCxm0ZP/bOOz6tm/eDYZXg8OwZ0RRJd4X 7NVPTeWNbT7N533B/aWqdgw+/rEFLWGAY+WczYhcQHUYTgUbN75y6PjRIvGNrTMV8d7hEJ 7A1SBrcne6XiNrymgHPg0YpoRmo9fZOPXURnz6IJVdrZMBfhXAhee8aYKuBPldmaqMBEWA H20V437MBEEIcM1rdfW8aEKot+/nFg5TVco89gPi0Nn7WhIpeWfr+zDRLoTZvMyO3BO/n6 0qdlcePI6x8bJ7wNYEOCOAmRUAKqu79RilfmVmqN+4FkYgJh4e5JqxFTxyT56A== From: Fabio Natali To: 68289@debbugs.gnu.org, ~@wolfsden.cz Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: <87r0f4l4kb.fsf@fabionatali.com> References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> Date: Thu, 18 Apr 2024 19:43:41 +0100 Message-ID: <87jzkufr4y.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: me@fabionatali.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68289 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2024-04-17, 10:30 +0100, Fabio Natali wrote: > Hi, a quick follow-up on a couple of points. Also, I suppose one could use Guix's 'invoke' instead of a custom 'checked-system*'? https://issues.guix.gnu.org/issue/68289/#0-lineno88 Cheers, F. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 17:10:16 2024 Received: (at 68289) by debbugs.gnu.org; 18 Apr 2024 21:10:17 +0000 Received: from localhost ([127.0.0.1]:54710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxZ1M-0003Wq-6j for submit@debbugs.gnu.org; Thu, 18 Apr 2024 17:10:16 -0400 Received: from wolfsden.cz ([37.205.8.62]:36328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rxZ1J-0003WM-JB for 68289@debbugs.gnu.org; Thu, 18 Apr 2024 17:10:15 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 2F2D424E0EC; Thu, 18 Apr 2024 21:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713474598; bh=WDxp22sVC+Ovicqc8qn2ZBdni6VfB73V3ASJqwOtCpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=k4enUs48WHs+FMcofUYO+YSxh6L3j5ZoOU6JVP72/RYvYrG7bqQsqOxucwt19cF2k mmBLXaCmOzpu2MneioPcGzwPWo8bD9C3S8+mVllZb84EJ+p9nnyWJ8lOUP4T6XiYXw 6NbzXTLHgt7jp158ntQScOjxniGOGBYoEcVOYVBzy7nCcRzXIiKUQAnpxCCHgo5fIP t5LeqMYfOQkpjJKG0e6KcDjfjmWvogKC//cd9Kgbez5/7/cb6ifmHuJr4N+fimG1z4 SP/+/bV+F5t9p/SFW8/AqnnG7MUXrFypMfQcIntHYaglYs/tHpangfCI/kiSZ/efob d7MiHhyRJBeyleUJmb25jZOmdBSm0n1ipYoQg0aIWfPwb0UPYRAj/5T42YDhHNN937 Hk2YFz+36On2mX3VZ0vgweeoreIfa/Fpme4koucAB+eJn+5r6koCPxXeLoBH83fm4u eRwgMF7hEe/4sO8iOlCW6dmw1Cak0UqqRZxEC1iRHysT1jMQzeQcCWPECIhbjP5pNk LZkNfhqMgQYqF6yTI5ZuUDpoSg3JrDd60kW3RTOD+u6eButD50MrEGHEGG2ySl20Xl qxnFu1DDu3TfzwVHTbdrr+eiqjvJ1jq+lwgWvRE+BI4IUNIZnZCo6jWFvo5HADQL8X qr5MwCsQyHx8CKvhFBt6gDUk= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [146.70.134.143]) by wolfsden.cz (Postfix) with ESMTPSA id 4B37124ECF5; Thu, 18 Apr 2024 21:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713474597; bh=WDxp22sVC+Ovicqc8qn2ZBdni6VfB73V3ASJqwOtCpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=UCgojKm0Kxuf1W8xpD83BlZC9wLPu+BQ5UP20f76CgAsz6atnnG0ZDpPFZTp85yhI NTRVkFTNNhp4ZMQs7IdnBhhzWLMgqIkUZa0kTy0xNg41NLrB644ODVauLnE/YX8a4j lBSyjjo0KKYzdWQMDliKWyHQjZAiyU8gHsTybWhrZLpyB7D4NwVspST6vofHHAjozA S4IxH2K/IOjn6c+3ycEdWxmgFrQUev7HraedcnukvtBCavb6+qwKHHEA+e96kG+lo/ xE+vCLpRPVZhWg8sg3iduFSwqzPoNeA6+56AM/gYr3XKQeQfp9DvmB2BlW66Np3zzR mxQ0NRGmXOXoneiMhLbPYpfi6ob19ZV+P0Ptydev2y95tJKMtZ7rgSy0KSvv+vnP1w ZDQiDhkDIbvkuUxM+JqdItk/lErrGp1GDg7C9R+2Ix3aYfanUZUfN8sv/AXpWAobLs JNpUtAMc5IYqJjM5VZm5/G7C6czvHoexnPMDFEhkYhUwAp9KWwMF15O6eexDZbtXZG ACElSPgUm2qXFnyLy4eAee/jBcdar1qQ6Zmri4Aq7N6esOfgDOJBEB2xWI5rRhEbOk Y/mqccz1ZZTxG33NJEahah+8XOCB/MsaitQRTbOfTQBs0ZRn8WlS28Th6T6rQPeA00 kY8q1+Ldv18fEzFUppXMDZvM= Date: Thu, 18 Apr 2024 23:09:56 +0200 From: Tomas Volf <~@wolfsden.cz> To: Fabio Natali Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wplv4idoBjXUMUT4" Content-Disposition: inline In-Reply-To: <87r0f4l4kb.fsf@fabionatali.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --wplv4idoBjXUMUT4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Fabio, first, let me thank you for the review, and apologize for somewhat late response, sadly I have been busy. On 2024-04-17 10:30:12 +0100, Fabio Natali wrote: > Hi, a quick follow-up on a couple of points. > > On 2024-04-16, 19:29 +0100, Fabio Natali wrote: > > - I haven't tested the patch on my system yet, but I plan to do it > > soon. > > I've tested the patch and it works as expected on my system. Great! :) > > > `(determine-vty)' is similar to the block below, but `startx' relies > > on the `tty' command from Coreutils. Do you think there might be any > > advantage in using it in `(determine-vty)'? A slight simplification > > perhaps? > > Looking into this more closely, the `tty' command wouldn't be a > simplification. It might be a bit more consistent with other parts of > the patch and it'd abstract away the hardcoded `/proc/self/fd/0', but > probably not worth the change? I think the current way is fine, since this is Guix specific code, so it do= es not have to be extremely portable. But that is just my opinion. Would be = nice to know if it works on Hurd. > > > The patch saves the server's auth file in `/tmp' whereas `startx' uses > > the home directory. I wonder if this might make any difference in > > terms of security. Related, how can we be sure that `(mkstemp > > "/tmp/serverauth.XXXXXX")' will be setting the right file permissions? While POSIX does not seem to specify the permissions of the created file, t= he Guile's manual is pretty clear regarding it: POSIX doesn=E2=80=99t specify the permissions mode of the file. On GN= U and most systems it=E2=80=99s =E2=80=98#o600=E2=80=99; an application can = use =E2=80=98chmod=E2=80=99 to relax that if desired. In my understanding that makes this usage safe. > > I see the reason why we want to use `/tmp', as otherwise the number of > stale `serverauth.XXXXXX' files would grow indefinitely. Using `/tmp', > at least we know they'll be garbage collected at every reboot. Any way > to emulate `startx' and use some sort of `trap' to remove the file on > exit? Yes, the clean up was the main motivator. The script could *try* to clean = up, but even then it would leave garbage in the $HOME in situations like power failure and kernel crashes. So using /tmp seems like simple yet reliable solution. > > > Finally, on a purely cosmetic side, any reason to have `(define X > > (xorg-wrapper config))' outside the G-expression, while the other > > definitions are inside? > > Oh yes, the `(define X ...)' has to be outside the G-expression, of > course. > > The security aspect (in relation to the server auth file, its > permissions and location) is the only remaining point where I'd like an > extra pair of eyes. The rest of the patch LGTM. > > There's a couple of microscopic formatting issues (e.g. an occurrence of > tty where I'd write TTY instead), I'll list them all in a follow-up. > > Thanks, best wishes, Fabio. Have a nice day, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --wplv4idoBjXUMUT4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYhjCQACgkQL7/ufbZ/ wancOBAAhw1uq2DKbubetW4Pamy1U/lc+2JgOsUZtNaKMgor7/LTTZEJWAj7Foik N8I3FvXpyUX0o0uGKxlAMLHSGRSI1CAERzbAFfdWox8anh+/LgxXd4R+L2nOf84v MJf/h0FqoDc16Bl7U7yfKVob6JS8WiR+p6NM38YwaVMAbdtsKMZwmyIAAQ2UDdti sEHgBlReq591XFX8sRmvA6Sbl+UNMoc2i6QH1FAn7jc4hyyjxfcIiGETt9PLsCMz K4yhGXwCmhbpPcVozW6qZW272vmY1q7aiqpCpHymQeZMAhO9I0XVnAFcmksPlf7j JcKLuSgHg+GJeXMF9iucs3V53K9WcTydMBAKqaYqTAvRhcudTNAl3BdGl4/L2DyM Mok6Dms4JTalVBk88Dd2yvGBae+INeBj3ErXPRnlZccStLCScvCOtkC7BZ/dQTRL zGUfUgTMRxXLGPrWVVaO/yAU9IkHRLti9ww6HhOfm5MQRK1DzE+kWt4cAUDgDGVY hW2Sggg9UkK9oCb3w1+Xf387mvrF3WcJqtqSrSmEDhyCklIMOQ+GpRzZuHDsLE33 pVatUu+tS2ae2oGnayDxi/+54LGVSN/i5AF8R7m6ZTFFqTpD5NjhQRVb20R1pZ17 jUwrjzDtaE3JKJHH6djbZnGRUKjlQVBAd5rPvb99d2xRkaevmIU= =XkJ6 -----END PGP SIGNATURE----- --wplv4idoBjXUMUT4-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 17:18:01 2024 Received: (at 68289) by debbugs.gnu.org; 18 Apr 2024 21:18:02 +0000 Received: from localhost ([127.0.0.1]:54743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxZ8r-0004O5-F6 for submit@debbugs.gnu.org; Thu, 18 Apr 2024 17:18:01 -0400 Received: from wolfsden.cz ([37.205.8.62]:57226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rxZ8n-0004N9-6j for 68289@debbugs.gnu.org; Thu, 18 Apr 2024 17:17:58 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 61D5D24DC7B; Thu, 18 Apr 2024 21:17:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713475062; bh=OooHzGs9l3mG2ZMTOw/0BoDzy1MGH+ekEoL8tKY1I/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=jvHscS4PL9U/tBoRRvQg3f/5U/zoRvBBy1ESlIzqpkFRKc0PFKcyrSEGVmZwb6eXS SABag+lO8j68zbDRjNf/djR30bZboKlgJmZBFnoieFvpYZxd5aryVGq7x8P9bZo5rc WUwWfYEAMEG4URu6YNHPzj/tuz/ny7PFrvQeGBjoKBLc6cpp/ScOioVzwjPILjZBi7 Gl3/EwvDoVtE22vbz/4WFx+JGL2tDEMfhIDpRLXDOtX7wLVgnCMpZgfgSVOqi1/92V jCDsfI7RrJY2yI68qgv+SqMAmrn8JjrzQeXvC2D5ADqA76NVTYQu8M0fHzCyu0EK63 yedHK1FqMnPijh1PQk9PlkFChVHqg9kGArIRvl8UrpKgOGz/SZSsNRznjQyi7tlZNd BeB4mByX9XJ9g6HTL97ThJZInd2KVo/1Wfwan3t3Tx7+NuMI5NofnOqadEg78O6ELw T9bz4yXcgr1c1gE93X0ykPfUoL6kkwpJCbmKI+0XaGihieW7FRGtl/HOjIjEtJt4sJ EoTWwyvCSfIIw0ga7peXgW8t1ke3Wcz+yY3nKho6rCdY22mUMYwaMxGI4ugKTC1l8z uSe+iyxAuQsxInkOBtfOEfoHJ3HIlBYIO2tl7UFm61Er2joNNomRYLc8u7EEDbGKtj bJEd6OgFWiFIWPqaiPjw938I= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [146.70.134.143]) by wolfsden.cz (Postfix) with ESMTPSA id 70E9824DF71; Thu, 18 Apr 2024 21:17:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713475061; bh=OooHzGs9l3mG2ZMTOw/0BoDzy1MGH+ekEoL8tKY1I/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=jQkOX7kCe2cPGSIAMnA+p+SPMmAMqJT0kmqeHeg8m6eV1jumgjvmcZXLCs1F11w8D Zw7xPbSWKY4ZkcsePgVGooTt7JH4OVgKP/2L/aUTAn3VD6VbS4S56gPDlKwxQQEgAb mmGsI/TSHVyIKWw8AagSaFTObJYq5ft0SFPoGZsVcRlt75QXMblVr+pR3N6q8MjkV6 PCFl3SWK2E9GrfNW+bBYglTObCLVuB41l/fXiDHBYAkif/dJcwx+/70Z+29zKteZr5 HGs/Q5yy/1B087KgmmNfeO9zpeKyJdrr5a36PThcZF5nartlouP1kWS+hjhDRjNi4h DAmLa90hmqgagWbxS8eYziIAN8BQVoEgIhlZTTWcScASPkAJKcvgPk7/qFZiWN0vAi cfHqzXVdHeGxzLKGvDcjleoRi+WJ8ZH/xgXkUhsn9Y0H6yq0AdlS55GycAvnLK6fY1 qMWPazRyADmwLHhDkpkVOe2mpBApXSzfxgIkvE7hDLpiKRYFo5ohlr03/gzr+5wzFj MG6l67SGKMw+RRbY/sI46RRHv/JExehxDfrRCo1Wehro3Z42keMnJpMhIRg1XWBfwv QnTOomGE/mTerEoKP95lB+5D77UeyZSH4nIgzhbLnF8iLPRdJxZ3wecWzNjsxHE9/w oZ1VWuLxpUAf5vUh8X+ruTho= Date: Thu, 18 Apr 2024 23:17:40 +0200 From: Tomas Volf <~@wolfsden.cz> To: Fabio Natali Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87jzkufr4y.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6V8abyTJxuDIsuHk" Content-Disposition: inline In-Reply-To: <87jzkufr4y.fsf@fabionatali.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --6V8abyTJxuDIsuHk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2024-04-18 19:43:41 +0100, Fabio Natali wrote: > On 2024-04-17, 10:30 +0100, Fabio Natali wrote: > > Hi, a quick follow-up on a couple of points. > > Also, I suppose one could use Guix's 'invoke' instead of a custom > 'checked-system*'? > > https://issues.guix.gnu.org/issue/68289/#0-lineno88 > > Cheers, F. Yes, that would be an option. I do not remember why I wrote it like this, it is possible I just did not know about `invoke' at that time (the code is over a year old). However I am not sure whether it is fine to depend on code in the (guix build utils) module for non-build purposes. Assuming it is fine, I have no problem sending a v2. Cheers, T. -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --6V8abyTJxuDIsuHk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYhjfQACgkQL7/ufbZ/ wameDw/+JTVUtT2IvGpB7d69FShKy9nZhqn/gWQMaisBoUlZVzQmdoEICDWGept/ ZJncP4QInV0TVywiegQehWhkz+EAHaHYWzwBpU9CSm1s7v6/En73TlOC9RHxMK4A wOf755gwiFGZkuXEm8ywYMj3BKIBza41pHgf51THZ0SjTjRqEexxwYhmSDE9gcqo 9oib1kGNREo27Dlu9P4JF6XQ3NcOFWoO5+u+8BoqR5CbOLs7JjYZmdGvfSxWkmhi 1/Go8xiTpiawHtP4bYrkM3fGBcGiaqk1Y9YHonEN07ZjcXiEfEIYlb7t2dAKyb+v YLiRt0WnwZ5GQLKe8ZNKVk4ZUDATT+tMWwG0A57/Vo9ryQBjo82oc11zUa/SbgWy xbZngrBU6LuJ4D+ucAiLZ8MafmzTEDePujj/YKfJSyEQiDTgLXGTCAvsJ/96VNYQ LIbHD81Wq6Oh0tMT+SYpbc0orsl+CF/YnMyJ6atOGiWEIqyAXYP/AmjddIIBn4bh PcOwkcy0JnTG+bxS5B2IR1tks4TVtheiDtuqYMZIlFUXgYOJyk3YyXbc1qxoVJQr UsG76TZg0ZMAXV+G6Q36qP5vtddAHNwGXsBroB2WY8SKUnNmRqBlaD62/rTnBNAG POOIBN3d6UJ4P6I3hzGGkKSnG2JfDNva7JO9r0kFRoG9TclmURU= =0giq -----END PGP SIGNATURE----- --6V8abyTJxuDIsuHk-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 08:28:26 2024 Received: (at 68289) by debbugs.gnu.org; 19 Apr 2024 12:28:26 +0000 Received: from localhost ([127.0.0.1]:58255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxnLu-0002Mh-1U for submit@debbugs.gnu.org; Fri, 19 Apr 2024 08:28:26 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:58421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxnLr-0002LR-LC for 68289@debbugs.gnu.org; Fri, 19 Apr 2024 08:28:25 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 81C14E0004; Fri, 19 Apr 2024 12:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1713529682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EdZp1Vc9lZZpVgPn/4qoizQLU+p5OA/8BHb/a9vPz9s=; b=YF2V6J0I4lAfOAEnpDPi4NteSKP2lmSdYtGr+SOCYu4H9BURoMYHFLj1NuwxOKKJ8TItrw 1+OMl6ZPsMYQQ86gPdq/ecvigVTBZT2xjkw8CNDFewBcA1ba8146WT124hi8RNfUciHSxd /Qz13BedQ77QlmdjwvRDv0gHFh1HmPE9RmfoC9D2vfOR4hJPqh1PBpphVE/sm2HvTdQtN4 qUGwfXxENrdibuMCbT4koMYrbwCQjC+1Gwtbb3jM6EJqa2CoqA3QMkUCrSglI5mHRK0dD/ q1viUWtbWAjBGxg5gLs7i9l6fZs1/j7XETk1cTvbpQnCkwx+7taa4bDXOdAJqw== From: Fabio Natali To: Tomas Volf <~@wolfsden.cz> Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> Date: Fri, 19 Apr 2024 13:25:46 +0100 Message-ID: <87zftpedyt.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: me@fabionatali.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2024-04-18, 23:09 +0200, Tomas Volf <~@wolfsden.cz> wrote: > first, let me thank you for the review, and apologize for somewhat > late response, sadly I have been busy. Contrarily, thank you for getting back to my points. =F0=9F=99=8F It all sounds good. I'll try and bring this up on IRC or during one of the patch review sessions organised by Futurile - in case there's a committer who's willing to merge it. Have a nice day. Best, Fabio. --=20 Fabio Natali https://fabionatali.com From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 08:00:37 2024 Received: (at 68289) by debbugs.gnu.org; 24 Apr 2024 12:00:39 +0000 Received: from localhost ([127.0.0.1]:58086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzbId-0005MC-4m for submit@debbugs.gnu.org; Wed, 24 Apr 2024 08:00:37 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:53639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzbIR-0005IT-Tf for 68289@debbugs.gnu.org; Wed, 24 Apr 2024 08:00:26 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id B9E7740004; Wed, 24 Apr 2024 11:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1713959996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xzS+Jft48Mbih3hWjFk0ikK7jT3VdIIAYZcSngEIjPY=; b=Ws4EV7GOTEwcMB36QyJEO/ztbSkSGUAGbbIky50jYL8DNjY8y5pfXyEbEnn0/zNwhydqGL b/XenGU0PIjCBVw7s7oVjcdzRxYuqiIEvuJCDKojHJZdYCXEDrwOVaFe2RQ2JmI1XCRXxc GFkmsw4auRRLo13Sq1u4zeA0Kxo2xUyma/wOOWkxGzwZSEV1VECd0uozcMXD0pKNGyKzeh dv1KixwNZhEv5ksyX5D+IbABI/0pH2GbIjvAsNKDgmP+asWGT2a4zQ3cfvTPWSRWRh/VfV ilf5CKGztuE8DmxDDBmCfgeL/0KPxX+WaNwvRVd7Psh/8CQat+ZM5zhdTxQX7A== From: Fabio Natali To: Tomas Volf <~@wolfsden.cz> Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: <87zftpedyt.fsf@fabionatali.com> References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> Date: Wed, 24 Apr 2024 12:59:55 +0100 Message-ID: <87le53nf7o.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: me@fabionatali.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2024-04-19, 13:25 +0100, Fabio Natali wrote: > On 2024-04-18, 23:09 +0200, Tomas Volf <~@wolfsden.cz> wrote: >> first, let me thank you for the review, and apologize for somewhat >> late response, sadly I have been busy. Hi Tomas, Sorry for the slow follow-up. After some further testing and some input from other Guix friends, this is my humble feedback on what I'd put in a v2 patch. - Use Guix's 'invoke' instead of a custom 'checked-system*' procedure. - Where possible, use '#$(file-append foobar "/bin/foo")' instead of '(string-append #$foobar "/bin/foo")', so that as much computation as possible happens at build time as opposed to run time. It's a microscopic difference, but still worth the change I think. What do you think? Not urgent, but do you think this is something you might be interested to include in a v2? No problem if you're busy, but let me know if there's anything I can help with. Tangentally, with regard to 'capture-stdout', I'm exploring if this is something that could be added to '(guix build utils)'=E2=81=B0 or perhaps addressed in Guile=C2=B9 instead of Guix. This can be left as it is in the patch, and potentially refactored away once a similar procedure is available from Guix or Guile. Thanks, best wishes, Fabio. =E2=81=B0 https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00199.ht= ml =C2=B9 https://lists.gnu.org/archive/html/bug-guile/2024-04/msg00015.html --=20 Fabio Natali https://fabionatali.com From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 13:44:27 2024 Received: (at 68289) by debbugs.gnu.org; 24 Apr 2024 17:44:28 +0000 Received: from localhost ([127.0.0.1]:59612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzgfP-0000nK-Jm for submit@debbugs.gnu.org; Wed, 24 Apr 2024 13:44:27 -0400 Received: from wolfsden.cz ([37.205.8.62]:41682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rzgfI-0000lU-Nf for 68289@debbugs.gnu.org; Wed, 24 Apr 2024 13:44:20 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 769DD28D50E; Wed, 24 Apr 2024 17:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713980636; bh=VTR87ubBcXgp+MmSMW4bYbMtlF2uAni6wQFW3F+2A4I=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=rzV72chXrdcBBReKzj8WCYH7LIaSRjSiT+BG9M7ZcjzpBUud/zDvoHlrEeLaNFw4W Rz46koBx/tvsWoFe2i0gslhqvtmSv1TwEeO4BiuQT8wqtpgyPvV9sencDZUCzyLenm EVghwUMDx+OXI601CO1cBijjNOhUSENgnI0ps+Jvclr6WJB3ODYhhvjcHM5FgYvF0G e0uh6UQdgmSV5APdp/zMHmDTmF/QMeF/+jTmlJwE5cnM9l7JBsvX9eKzuEIMob5Yy2 +/a66yBtJstmllMLuuC5/jAP2PPG3dELGXAl5Nu0hYH60yKHgk3ERyA5+YxRkp8uKy YY83IB/ejssDMWBICNCdYiDwzlVfGcT1eaJohYPgjKOmLbaeOSN/7IeN8xuDt/YR7C qmDFXjUYPjk2UITiLl3103b0+9JrNKwsOPrCJlEFc8a9VwmNMYJfPqlPFW29DF9btp rENShhLmGkB7M1ZukVJCi1AhSCVdpTGQCj5LSDWNVE8zz2Q3GW/QrHzjJ6SXLbAWVG +4U8DZ2QN3dFt8u/LZW6c3C+admdd/UOx28PghNbJ2eh2WECvBwpPHBJbczQAyn8Co HSjAXtdOMpBBIVFEx4VPrK8s5Uj3/4lJqkilHy+oZjQVQJmzyTueuN4pOhp+EXnemx 0L8ts88/U24ZWAPWy0kONcic= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.159]) by wolfsden.cz (Postfix) with ESMTPSA id 03B5E28B4CD; Wed, 24 Apr 2024 17:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1713980636; bh=VTR87ubBcXgp+MmSMW4bYbMtlF2uAni6wQFW3F+2A4I=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=rzV72chXrdcBBReKzj8WCYH7LIaSRjSiT+BG9M7ZcjzpBUud/zDvoHlrEeLaNFw4W Rz46koBx/tvsWoFe2i0gslhqvtmSv1TwEeO4BiuQT8wqtpgyPvV9sencDZUCzyLenm EVghwUMDx+OXI601CO1cBijjNOhUSENgnI0ps+Jvclr6WJB3ODYhhvjcHM5FgYvF0G e0uh6UQdgmSV5APdp/zMHmDTmF/QMeF/+jTmlJwE5cnM9l7JBsvX9eKzuEIMob5Yy2 +/a66yBtJstmllMLuuC5/jAP2PPG3dELGXAl5Nu0hYH60yKHgk3ERyA5+YxRkp8uKy YY83IB/ejssDMWBICNCdYiDwzlVfGcT1eaJohYPgjKOmLbaeOSN/7IeN8xuDt/YR7C qmDFXjUYPjk2UITiLl3103b0+9JrNKwsOPrCJlEFc8a9VwmNMYJfPqlPFW29DF9btp rENShhLmGkB7M1ZukVJCi1AhSCVdpTGQCj5LSDWNVE8zz2Q3GW/QrHzjJ6SXLbAWVG +4U8DZ2QN3dFt8u/LZW6c3C+admdd/UOx28PghNbJ2eh2WECvBwpPHBJbczQAyn8Co HSjAXtdOMpBBIVFEx4VPrK8s5Uj3/4lJqkilHy+oZjQVQJmzyTueuN4pOhp+EXnemx 0L8ts88/U24ZWAPWy0kONcic= Date: Wed, 24 Apr 2024 19:43:54 +0200 From: Tomas Volf <~@wolfsden.cz> To: Fabio Natali Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> <87le53nf7o.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Mwp9TWOjmyi+k3x/" Content-Disposition: inline In-Reply-To: <87le53nf7o.fsf@fabionatali.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Mwp9TWOjmyi+k3x/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-04-24 12:59:55 +0100, Fabio Natali wrote: > On 2024-04-19, 13:25 +0100, Fabio Natali wrote: > > On 2024-04-18, 23:09 +0200, Tomas Volf <~@wolfsden.cz> wrote: > >> first, let me thank you for the review, and apologize for somewhat > >> late response, sadly I have been busy. > > Hi Tomas, > > Sorry for the slow follow-up. After some further testing and some input > from other Guix friends, this is my humble feedback on what I'd put in a > v2 patch. > > - Use Guix's 'invoke' instead of a custom 'checked-system*' procedure. > > - Where possible, use '#$(file-append foobar "/bin/foo")' instead of > '(string-append #$foobar "/bin/foo")', so that as much computation as > possible happens at build time as opposed to run time. It's a > microscopic difference, but still worth the change I think. > > What do you think? Not urgent, but do you think this is something you > might be interested to include in a v2? No problem if you're busy, but > let me know if there's anything I can help with. All sounds reasonable, will send v2, cannot guarantee when, hopefully this = week. > > Tangentally, with regard to 'capture-stdout', I'm exploring if this is > something that could be added to '(guix build utils)'=E2=81=B0 or perhaps > addressed in Guile=C2=B9 instead of Guix. This can be left as it is in the > patch, and potentially refactored away once a similar procedure is > available from Guix or Guile. > > Thanks, best wishes, Fabio. Yes, I noticed the thread. Having the option of doing basically (with-output-to-string (=CE=BB _ (invoke "date"))) would be amazing. I hope someone will take it up and implement. :) Have a nice day, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --Mwp9TWOjmyi+k3x/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYpRNoACgkQL7/ufbZ/ wamScxAAlLzGrqwG2XhGk7eORqJQXYEkrGLxgFeP3IcJ5c6hPTEwIxeFeZ0OedlU tkANrlbBB10rAX1z+STeBkpq0ISuJzIoR/GSTWp4XIg4D0oYijH+n1DpIyIPz9s2 gAXcHkbVgTTbF1uJhhWllb+TLbpN9eFSiT/+v3jNYS4CdOOt0iwcLSV/aTOnY3yM U4hRIrC5/Xcx8VpCU7sID1VYHYjcaX9rhJGYl4rOcPCrrPBurEEoQENQIPCtkU7s CZ4GBeEs8zLXXv+atynCaH7szKOOtvNOcWhlSqw3FLHvDQdTfemF9IO8eXhvYhAH qz/WElkKESd9WrynEcdh2TXESlRGsGM58mFUpgdUFCes1gUtJdcFoCId9EpHEhPQ 07Xxi4VAVKDT975GW/rw76EfV+BHq3eyOFNHluoXXgWxbrh4hWrQEXAQiJUWpazt 2ppK/GKAJ2ZFodDP0JcG85jRbvTRZDjPTupil36gv/ge7OgBGwx/FfE87g83jag1 VrcWG2bT4ESbnNw1rp7pZiK9MIPf7I4SKhiuDWtdlfXAp6PVFlE9l10lXODZuVYs 7CLNo57Wn7LOTE9JxkNgc59HsuJspdSOdA55OFw7K+WAwX34ijGOIma0MclsvdMr OEGqIlwPcznUjOVyP7LINj2L8Bu92kqUZpr27iqoZMZlcZBgaNA= =Z5k3 -----END PGP SIGNATURE----- --Mwp9TWOjmyi+k3x/-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 05:56:38 2024 Received: (at 68289) by debbugs.gnu.org; 2 May 2024 09:56:38 +0000 Received: from localhost ([127.0.0.1]:42770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2TB8-0006N3-0e for submit@debbugs.gnu.org; Thu, 02 May 2024 05:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2TB5-0006Mw-Im for 68289@debbugs.gnu.org; Thu, 02 May 2024 05:56:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2TAd-0000xt-Hg; Thu, 02 May 2024 05:56:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=7AO6Ro7tP9oTQtxTNuG7It7+LxDs6GE8N7/S9zY/d0U=; b=BQxiQa93LAPThs+s+vYK HpmwaMCNYRsN9xrKkpVUzV9vXklj8ZoEoOvp7e11lGipIgq25mszPxB501qWYy6mLjlZ39aqm+ASC aD32N1/er3MsVxnFU9fBLUDShakKN/S1qRB70PPn/u5xjcaqbwNGv1oljQgM45pgKRjdBFX+zAfCu WKOdeZGp6E5wFXRl2MNlV67W9zT3vNDSPrBrlSC0MMJEvG2WuGsO/Y7nkCne/HQYzG/e5yQ6L5scn 68nL/2juaH2Pcci5f4vpbIQvySmX4CCt97YtDv+Za6h0YZwStcFuz9pcvmRMvmzSgurBwy48+zuda +qExK+kg4I0DGA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tomas Volf <~@wolfsden.cz> Subject: Re: [bug#68289] [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: (Tomas Volf's message of "Wed, 24 Apr 2024 19:43:54 +0200") References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> <87le53nf7o.fsf@fabionatali.com> Date: Thu, 02 May 2024 11:55:28 +0200 Message-ID: <87edakzgfj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org, Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Tomas Volf <~@wolfsden.cz> skribis: > On 2024-04-24 12:59:55 +0100, Fabio Natali wrote: >> On 2024-04-19, 13:25 +0100, Fabio Natali wrote: >> > On 2024-04-18, 23:09 +0200, Tomas Volf <~@wolfsden.cz> wrote: >> >> first, let me thank you for the review, and apologize for somewhat >> >> late response, sadly I have been busy. >> >> Hi Tomas, >> >> Sorry for the slow follow-up. After some further testing and some input >> from other Guix friends, this is my humble feedback on what I'd put in a >> v2 patch. >> >> - Use Guix's 'invoke' instead of a custom 'checked-system*' procedure. >> >> - Where possible, use '#$(file-append foobar "/bin/foo")' instead of >> '(string-append #$foobar "/bin/foo")', so that as much computation as >> possible happens at build time as opposed to run time. It's a >> microscopic difference, but still worth the change I think. >> >> What do you think? Not urgent, but do you think this is something you >> might be interested to include in a v2? No problem if you're busy, but >> let me know if there's anything I can help with. > > All sounds reasonable, will send v2, cannot guarantee when, hopefully thi= s week. I hadn=E2=80=99t seen this patch; having a =E2=80=98startx=E2=80=99 command= is something that has often been asked, so I=E2=80=99m glad you=E2=80=99re fixing it! The patch and the suggestions Fabio made look great to me. Perhaps a useful addition would be to add a service so one can write nothing more than: (service startx-command-service-type) to get a =E2=80=98startx=E2=80=99 command? (Not a blocker though.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 10:58:31 2024 Received: (at 68289) by debbugs.gnu.org; 2 May 2024 14:58:31 +0000 Received: from localhost ([127.0.0.1]:44257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2XtG-0006sz-UN for submit@debbugs.gnu.org; Thu, 02 May 2024 10:58:31 -0400 Received: from wolfsden.cz ([37.205.8.62]:36482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1s2XtD-0006st-2A for 68289@debbugs.gnu.org; Thu, 02 May 2024 10:58:30 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 894C1BF6C; Thu, 2 May 2024 14:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1714661883; bh=E45Yjf6u75h17ukWqStrIYoPCp8OFGDQ3sY1rDXK+5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=EIkKSfmFh9gwr+Om3IVpZQhypfMPQazggYSovxfIL8p9B8NDXfUc1EB6ljZo12blT Ty7fxvD5pDMHZtsED5gXtteq0Ml8291n4BIK7kz/CaFWUnA8z+mKP8FKEPGpVCXNV1 xLR8g6E5mAlxk/GeCkrGtloN8ghtf69EUUQEQ4dsc5z+0s14t6KQiYs4k+wJCOMdFr /TUixCKP2DzL/cOcxnsFbiZsX+/lz1sJmyvzE+mKTtLdfsKLEbCTZwD9fehqM1S3t6 gENspMCHG2njzwzkmnZZ6u8aPCDxGLUYYGp5USVrCvgjyUCeQpdFH2yWh7b20nH4b0 A3PogcNw6CVUbvtRq3CKW/g/LLb4TCwWcjN1pNObzd8nG8DDKKxb6eytehv+X/354c 9mdf/cpOb1zQXxASeSE9cVDUV2PjjSn6eURt26fyKxtIywGica925fC6SnjcO8MQOW 7TdZgsBmRf9HK7s5+T1knj0iiYxwPabENPvEm89u3j/H5CXQYIKZ3CGYLSAVfTvHlC pv4LNXj8qqTRxepT/GIper2c/CRQprcyn1uKMV9blpeoOmESWg4h5F2UqDZVwa7K+x YqOgzdoWjC0sfbOTKhHl8yRfPjReBpZz9y8xz3K0IibcTcnpqvDQXEe0MvKjD4mLQv qDuo85YYarBbEX58bUBSrFj8= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 15FC8CDF8; Thu, 2 May 2024 14:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1714661883; bh=E45Yjf6u75h17ukWqStrIYoPCp8OFGDQ3sY1rDXK+5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=EIkKSfmFh9gwr+Om3IVpZQhypfMPQazggYSovxfIL8p9B8NDXfUc1EB6ljZo12blT Ty7fxvD5pDMHZtsED5gXtteq0Ml8291n4BIK7kz/CaFWUnA8z+mKP8FKEPGpVCXNV1 xLR8g6E5mAlxk/GeCkrGtloN8ghtf69EUUQEQ4dsc5z+0s14t6KQiYs4k+wJCOMdFr /TUixCKP2DzL/cOcxnsFbiZsX+/lz1sJmyvzE+mKTtLdfsKLEbCTZwD9fehqM1S3t6 gENspMCHG2njzwzkmnZZ6u8aPCDxGLUYYGp5USVrCvgjyUCeQpdFH2yWh7b20nH4b0 A3PogcNw6CVUbvtRq3CKW/g/LLb4TCwWcjN1pNObzd8nG8DDKKxb6eytehv+X/354c 9mdf/cpOb1zQXxASeSE9cVDUV2PjjSn6eURt26fyKxtIywGica925fC6SnjcO8MQOW 7TdZgsBmRf9HK7s5+T1knj0iiYxwPabENPvEm89u3j/H5CXQYIKZ3CGYLSAVfTvHlC pv4LNXj8qqTRxepT/GIper2c/CRQprcyn1uKMV9blpeoOmESWg4h5F2UqDZVwa7K+x YqOgzdoWjC0sfbOTKhHl8yRfPjReBpZz9y8xz3K0IibcTcnpqvDQXEe0MvKjD4mLQv qDuo85YYarBbEX58bUBSrFj8= Date: Thu, 2 May 2024 16:58:02 +0200 From: Tomas Volf <~@wolfsden.cz> To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: [bug#68289] [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> <87le53nf7o.fsf@fabionatali.com> <87edakzgfj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="moWjzSzpx4WqGR/B" Content-Disposition: inline In-Reply-To: <87edakzgfj.fsf@gnu.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org, Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --moWjzSzpx4WqGR/B Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-05-02 11:55:28 +0200, Ludovic Court=C3=A8s wrote: > Hi! Hi :) > Tomas Volf <~@wolfsden.cz> skribis: > > [..] > > I hadn=E2=80=99t seen this patch; having a =E2=80=98startx=E2=80=99 comma= nd is something that > has often been asked, so I=E2=80=99m glad you=E2=80=99re fixing it! > > The patch and the suggestions Fabio made look great to me. Perhaps a > useful addition would be to add a service so one can write nothing more > than: > > (service startx-command-service-type) > > to get a =E2=80=98startx=E2=80=99 command? (Not a blocker though.) That sounds useful and I have no issue adding it into the v2. Could I just= ask you for a guidance regarding how to achieve that? Currently I just place t= he script into ~/bin (which I have in the $PATH). I assume the service will h= ave to place the file... somewhere? on the $PATH to achieve the same. Is there already existing service I could use as an inspiration? Thanks, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --moWjzSzpx4WqGR/B Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYzqfoACgkQL7/ufbZ/ wakoxRAAmoH2YvwsuikhwpsjULKECr01KVB/JNsFUGV0cs54iAdJ4dl7T8/plve4 c5eMB8LyakoLyd4C2LA+E1OgtjskFeQ6DAagGGcY5hGa0GGxINmzNhFcfs/v0MEA Pp2YJ92TQaoxNL1Z2eF+DhXAKUWQ1iiu21ia0MrZSVBGzpeoz+9cieaN3jUV/7ty KC/sZaF8KNAt1PXDAnx9B1YWCsT7PG053QNVuSyXUFnQ+D75Rlpq/b1AGcsFLjR8 q2oKt7T7tteZUyxipM6yTWzEuK4toInml5v6PvEFcIm8OTvkvtagr9nqrElDBlgq BQ+PtCq7jkjAPD50Y49NoEX8C/TTb72Him3bZ+P9+HTz43AZYLDTnlN0ukgmc/0r cIOtpyKG0G9NtPPypucfO/Elgdge1E9WPtzC118bIdzNCQ/IuJ7YnFedPN6hw0gn cMMSNPtjCA1yB5klazNMZaqynBhLx7tls3A/U0mpfbnaLqj1N4QtuGvifhHBBx9J hZ6m1yqOSe6Q+nJuhwRbR5IkH1xglsRFf+kZzmmmAJNckC5w1pHlVo3YVALVLaWE Q1jopnBWHW4s3slWQSavWC+xTqXMCls3gCvTUpeembJyOUWLBz13WfTOe0+SMqeF /o0OW1izNFWqdgHn0OD0GI7b5I39UTAqg+b5/Sz/NGxKi3DW89k= =vDL4 -----END PGP SIGNATURE----- --moWjzSzpx4WqGR/B-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 05:57:41 2024 Received: (at 68289) by debbugs.gnu.org; 3 May 2024 09:57:41 +0000 Received: from localhost ([127.0.0.1]:46309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2pfh-0004UN-DO for submit@debbugs.gnu.org; Fri, 03 May 2024 05:57:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2pff-0004UH-L8 for 68289@debbugs.gnu.org; Fri, 03 May 2024 05:57:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2pfC-0001uz-KM; Fri, 03 May 2024 05:57:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WrxqwNNtM6Vp75Rk8RqrI0Raec69/07TGFCBMYxCDgc=; b=BzIB469Kpz2Xy1vXAJ5H XxPo4h7tZs0yVUfFcKmgdm2y3t/putZb24jJbGuuZJlgfR90B+yvm+wopn1C6qM+rGvJ4m5vS4CA3 Vjs9DsHCX5YIxthYS8zJ7Jebyuu/bEy8WbFkXHN0rJjs0ul4vQlRYOzlPkWW4LNbT7KAEF6Ud55dx hPa/VNlRLcTZuUwlWbYP+WTPL3NvcG5ybY0E3L0KZZ8PgKNuZEZi4UtkjjPYG0JdwdzdNf50O4cVI UKR9MQ8+nzvwMrHql7xNENAVpvcY9TkSiM8rKihuMbFpD3ftIaBjk1gIXhaviU9EJ893KPPyEK9Nf 7bGh0FbVTqbucw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tomas Volf <~@wolfsden.cz> Subject: Re: [bug#68289] [PATCH] services: xorg: Add xorg-start-command-xinit procedure. In-Reply-To: (Tomas Volf's message of "Thu, 2 May 2024 16:58:02 +0200") References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> <87le53nf7o.fsf@fabionatali.com> <87edakzgfj.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 15 =?utf-8?Q?Flor=C3=A9al?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Ver =?utf-8?Q?=C3=A0?= soie X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 03 May 2024 11:57:07 +0200 Message-ID: <87v83vusjw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org, Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Tomas Volf <~@wolfsden.cz> skribis: > On 2024-05-02 11:55:28 +0200, Ludovic Court=C3=A8s wrote: [...] >> The patch and the suggestions Fabio made look great to me. Perhaps a >> useful addition would be to add a service so one can write nothing more >> than: >> >> (service startx-command-service-type) >> >> to get a =E2=80=98startx=E2=80=99 command? (Not a blocker though.) > > That sounds useful and I have no issue adding it into the v2. Could I ju= st ask > you for a guidance regarding how to achieve that? Currently I just place= the > script into ~/bin (which I have in the $PATH). I assume the service will= have > to place the file... somewhere? on the $PATH to achieve the same. I would extend =E2=80=98profile-service-type=E2=80=99 such that =E2=80=98st= artx=E2=80=99 appears in /run/current-system/profile/bin. It does mean that you need to create a computed-file that produces /gnu/store/=E2=80=A6/bin/startx (=E2=80=98startx=E2=80=99 must be in a bin/= sub-directory). How does that sound? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 09:27:59 2024 Received: (at 68289) by debbugs.gnu.org; 11 May 2024 13:27:59 +0000 Received: from localhost ([127.0.0.1]:48364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5mlb-00076Y-49 for submit@debbugs.gnu.org; Sat, 11 May 2024 09:27:59 -0400 Received: from wolfsden.cz ([37.205.8.62]:50972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1s5mlX-00076D-Ox for 68289@debbugs.gnu.org; Sat, 11 May 2024 09:27:57 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 2655D287B77; Sat, 11 May 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434074; bh=kFJZSer9CFhYedqtwpROWs6QdH1hOKy/ROas61wnOO4=; h=From:To:Cc:Subject:Date; b=K6jSpn5HTSMYxLM2rf4/nc+2dh9DbcgyFnN4gsbjUir6VbCT6SpXnDAnXdYVBwNQL L+7qxPlRRFwYJ5Lt8iDQRBmf45llRyj6lU4ZRONpQtOT1usy2hPHYteQj0znPoq5NW oYez/fSb50C3VsKw3Wn4zAcFqueQcC7trcKWGOSOnyJLEVNq/otWcfaP0lVAMRz5pu eOBWbwALzORVmt4k3LO8f74z7Zg+FuNyPaNoD7WfKelYdIHkOL9bLtLx+SNlFmt4Pe 2cxziL7nL4tTCAPdnbXb55eBosjx98KWmbQFWiWn7AJJvoNQCQp2MXVhA3G2t9BFDc sSBl48PTR8B2lawJhrRIRKtn02jLNsAnxMH6qlXJM8Mpszzq7pMIJJCYhdQ3fWc+QV q1L49Al+6EQMzJ8yR3bXqYz3MaqTNGYv9i9AZAa8LVhTev7gWLco2UuYCRHBBLOX+y O9Zdr8mkPTlZ18gNMSOv5MsuecBSgItaqWVhArC0DAcROQuEw2nMQCEcEIDKpEN3ur 71NjgBS2NCZOy3zCwM2vmr3KtbaBddvfNbTCqnAjkHmMGF/VVF9Rwh4Tg0dn0hwKQQ fD45ysFjPsRskhtvxHAQwnpanSwU8TySagQFWN+dA87uiaeKzyfr1D3W7tr4u/rFrx GBHRHP9QjJ+u2cvA4zCfmz8M= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 41E802895BC; Sat, 11 May 2024 13:27:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434073; bh=kFJZSer9CFhYedqtwpROWs6QdH1hOKy/ROas61wnOO4=; h=From:To:Cc:Subject:Date; b=LcSYRHtiTE7+9tQkvu+KlFaiw9PP02hf/Vh/4Lp1STJVQbD8r6vjJ30DBYavrxLcU GSAd0hKzYVcktCT82EBLMgt6dIMSXfVGiQnC8jNXY3wmxPgVZGVM2n56qhDIV1mgZY NGZCwFtsdEIQYSLxeJf2gG9j6B72Yobt9Rpm8Er9Q3oY0g9RhtR6jXlr/wk9a0c15k nZHp38aigeOZLRGHkv+7640259sPaRLiHPnEEvDJNT2+7KBiUxS+SNi+H2VuUWqsgw PaEUyYXnu1fgGFtTW1+gU1tEFeBV/l1STTN/iLMVo5EkSHH92qpeM6xas3JWsQsSNt AqvO57XpHdbxsYGESpMtSCufmHgnVDOvhqt6WuD3O+QzLzSJ2UCczjAjk9a1CwvunW iUzl/M9LWPTkbyuHl5VBgyqJOt/fb0dZtREXJw6WnLufQt/e1TPztmT7KorJC7lIlb i8GyLxNjY7UbkAv5DWHLDSTzq0uqRfv+NooqVW5Ui3uLPOCStW8DN+HiWMrsbFkv+d ybt9dYuKK7Op0cJJRpIGqSI7kH7j9XELv9BxvwiZgRlHq8iHpQn+q/80Br71Cvk9yL GrNXxYDVerQ+3sAwJ4V7ajXuZTM8JAa9GAikpoyxTVt1N/NpyeToiQsiZinEVwYMt0 djD2PSjRhmHPGqrsuSzZBGBw= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v2 1/3] services: xorg: Add xorg-start-command-xinit procedure. Date: Sat, 11 May 2024 15:26:23 +0200 Message-ID: <5197b347747fd3fb3d51a2c05b5cb676d387de8d.1715433985.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) When user does not use any desktop environment, the typical sequence is to log in and then type `startx' into the tty to get a window manager running. Most distributions do provide startx by default, but Guix has only xorg-start-command, that is not suitable for this type of task. This commit adds second procedure, xorg-start-command-xinit, that correctly picks virtual terminal to use, sets up XAUTHORITY and starts xinit with correct arguments. That should make running Guix without any desktop environment more approachable. * gnu/services/xorg.scm (xorg-start-command-xinit): New procedure. (define-module): Export it. * doc/guix.texi (X Window): Document it. Change-Id: I17cb16093d16a5c6550b1766754700d4fe014ae9 --- v2: * Use invoke instead of checked-system*. * Use file-append instead of string-append. doc/guix.texi | 18 ++++++++++ gnu/services/xorg.scm | 80 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index f20208f94f..c47b6fdd9c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23561,6 +23561,24 @@ X Window Usually the X server is started by a login manager. @end deffn +@deffn {Procedure} xorg-start-command-xinit [config] +Return a @code{startx} script in which the modules, fonts, +etc. specified in @var{config}, are available. The result should be +used in place of @code{startx}. Compared to the +@code{xorg-start-command} it calls xinit, therefore it works well when +executed from tty. If you are using a desktop environment, you are +unlikely to have a need for this procedure. + +The resulting file should be invoked by user from the tty after login, +common name for the program would be @code{startx}. Convenience link +can be created by (for example) this home service: + +@lisp +(simple-service 'home-files home-files-service-type + `(("bin/startx" ,(xorg-start-command-xinit)))) +@end lisp +@end deffn + @defvar screen-locker-service-type Type for a service that adds a package for a screen locker or screen diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 51d704439e..11b9c36995 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -54,11 +54,13 @@ (define-module (gnu services xorg) #:use-module (gnu packages gnome) #:use-module (gnu packages admin) #:use-module (gnu packages bash) + #:use-module (gnu packages linux) #:use-module (gnu system shadow) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) #:use-module (guix gexp) #:use-module (guix store) + #:use-module ((guix modules) #:select (source-module-closure)) #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix records) @@ -86,6 +88,7 @@ (define-module (gnu services xorg) xorg-wrapper xorg-start-command + xorg-start-command-xinit xinitrc xorg-server-service-type @@ -416,6 +419,83 @@ (define* (xorg-start-command #:optional (config (xorg-configuration))) (program-file "startx" exp)) +(define* (xorg-start-command-xinit #:optional (config (xorg-configuration))) + "Return a @code{startx} script in which the modules, fonts, etc. specified +in @var{config}, are available. The result should be used in place of +@code{startx}. Compared to the @code{xorg-start-command} it calls xinit, +therefore it works well when executed from tty." + (define X + (xorg-wrapper config)) + + (define exp + ;; Small wrapper providing subset of functionality of typical startx + ;; script from distributions like alpine. + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (ice-9 popen) + (ice-9 textual-ports)) + + (define (capture-stdout . prog+args) + (let* ((port (apply open-pipe* OPEN_READ prog+args)) + (data (get-string-all port))) + (if (= 0 (status:exit-val (close-pipe port))) + (string-trim-right data #\newline) + (error "command failed")))) + + (define (determine-unused-display n) + (let ((lock-file (format #f "/tmp/.X~a-lock" n)) + (sock-file (format #f "/tmp/.X11-unix/X~a" n))) + (if (or (file-exists? lock-file) + (false-if-exception + (eq? 'socket (stat:type (stat sock-file))))) + (determine-unused-display (+ n 1)) + (format #f ":~a" n)))) + (define (determine-vty) + (let ((fd0 (readlink "/proc/self/fd/0")) + (pref "/dev/tty")) + (if (string-prefix? pref fd0) + (string-append "vt" (substring fd0 (string-length pref))) + (error (format #f "Cannot determine VT from: ~a" fd0))))) + + (define (enable-xauth server-auth-file display) + ;; Configure and enable X authority + (or (getenv "XAUTHORITY") + (setenv "XAUTHORITY" (string-append (getenv "HOME") "/.Xauthority"))) + + (let* ((bin/xauth #$(file-append xauth "/bin/xauth")) + (bin/mcookie #$(file-append util-linux "/bin/mcookie")) + + (mcookie (capture-stdout bin/mcookie))) + (invoke bin/xauth "-qf" server-auth-file + "add" display "." mcookie) + (invoke bin/xauth "-q" + "add" display "." mcookie))) + + (let* ((xinit #$(file-append xinit "/bin/xinit")) + (display (determine-unused-display 0)) + (vty (determine-vty)) + (server-auth-port (mkstemp "/tmp/serverauth.XXXXXX")) + (server-auth-file (port-filename server-auth-port))) + (close-port server-auth-port) + (enable-xauth server-auth-file display) + (apply execl + xinit + xinit + "--" + #$X + display + vty + "-keeptty" + "-auth" server-auth-file + ;; These are set by xorg-start-command, so do the same to keep + ;; it consistent. + "-logverbose" "-verbose" "-terminate" + #$@(xorg-configuration-server-arguments config) + (cdr (command-line))))))) + + (program-file "startx" exp)) + (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 09:28:00 2024 Received: (at 68289) by debbugs.gnu.org; 11 May 2024 13:28:00 +0000 Received: from localhost ([127.0.0.1]:48366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5mlb-00076b-ML for submit@debbugs.gnu.org; Sat, 11 May 2024 09:28:00 -0400 Received: from wolfsden.cz ([37.205.8.62]:50974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1s5mlX-00076E-Ov for 68289@debbugs.gnu.org; Sat, 11 May 2024 09:27:57 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 67C4328885E; Sat, 11 May 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434074; bh=BpTPhVNFqgc8pHuYHOGv9f0jqtNiSBD4EzwDej5DyPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wzUxGu50k74AtYpm6nGCe41RMgkXZwZLLRyzq4sq3MEvM6ELSjnM9nYXd9qgqKZW1 J2K25QAySwnei8H+axAq9H7k10xnm3rsS6ow53oFCarlCQMcaUdq6At7+RrxZEICke yus5Ms6llwfRQKswrTzs0sEnlgzgTV4ymvIXkYZEplqAfq8uyj/PS2ZVq5/DGiBBfy UI3VmzODjGmvTDX17ktPTLCigjwawWNNvHua2oiHcrw/tw+e5GipaWuauE57vQt7cY gO6T7G5KyY6G2/OODOywxO6HB0qPJecQCcQSG7Gv3FzYIL1BQuat4KaldMVgP4AM9S uBnfq4xlRohHeC2GFeK0pa2zNhu4Jiy9jubKLY93UU9qWxmsWzNM6WeL3lTHcsb1E7 NSYoGLW+NdV7mUWlqAksAzhyJ4CTh5AK31EnyRGEM1xkrT5EWJSLAE82yK7cocOufI p9/KEVR00wKY4U4mZQHuRn4ONlk+U0qibQEYVy5akT6pQpHkvyrcfJAr4rVo7Jox5G jdXmRmGUWxpqxWiFdYCKOWhFpq5wtAYZa/n6bklEBNguM34R3g5y+tDxRIEKp6t4ek iAXN5SvkqBzFdDRbOAam13DITDEhBLm3iXGExGYWuzSU1gyZNCPnrFN2nQsaZwC7qH BBKsEXSqkg6t9/vUrGRFpzwQ= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 181212892C4; Sat, 11 May 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434074; bh=BpTPhVNFqgc8pHuYHOGv9f0jqtNiSBD4EzwDej5DyPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wzUxGu50k74AtYpm6nGCe41RMgkXZwZLLRyzq4sq3MEvM6ELSjnM9nYXd9qgqKZW1 J2K25QAySwnei8H+axAq9H7k10xnm3rsS6ow53oFCarlCQMcaUdq6At7+RrxZEICke yus5Ms6llwfRQKswrTzs0sEnlgzgTV4ymvIXkYZEplqAfq8uyj/PS2ZVq5/DGiBBfy UI3VmzODjGmvTDX17ktPTLCigjwawWNNvHua2oiHcrw/tw+e5GipaWuauE57vQt7cY gO6T7G5KyY6G2/OODOywxO6HB0qPJecQCcQSG7Gv3FzYIL1BQuat4KaldMVgP4AM9S uBnfq4xlRohHeC2GFeK0pa2zNhu4Jiy9jubKLY93UU9qWxmsWzNM6WeL3lTHcsb1E7 NSYoGLW+NdV7mUWlqAksAzhyJ4CTh5AK31EnyRGEM1xkrT5EWJSLAE82yK7cocOufI p9/KEVR00wKY4U4mZQHuRn4ONlk+U0qibQEYVy5akT6pQpHkvyrcfJAr4rVo7Jox5G jdXmRmGUWxpqxWiFdYCKOWhFpq5wtAYZa/n6bklEBNguM34R3g5y+tDxRIEKp6t4ek iAXN5SvkqBzFdDRbOAam13DITDEhBLm3iXGExGYWuzSU1gyZNCPnrFN2nQsaZwC7qH BBKsEXSqkg6t9/vUrGRFpzwQ= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v2 2/3] services: xorg: Add startx-command-service-type. Date: Sat, 11 May 2024 15:26:24 +0200 Message-ID: <147282c44ee8fb331aefd38a699b082c78e5b637.1715433985.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <5197b347747fd3fb3d51a2c05b5cb676d387de8d.1715433985.git.~@wolfsden.cz> References: <5197b347747fd3fb3d51a2c05b5cb676d387de8d.1715433985.git.~@wolfsden.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/xorg.scm (startx-command-profile-service), (startx-command-service-type): New variables. (define-module): Export startx-command-service-type. Change-Id: Ia2a7c3b2d5ebf6bcfff40cb2640b17d3baf6eba0 --- v2: New patch in v2. gnu/services/xorg.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 11b9c36995..51fa6f619c 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -91,6 +91,7 @@ (define-module (gnu services xorg) xorg-start-command-xinit xinitrc xorg-server-service-type + startx-command-service-type %default-slim-theme %default-slim-theme-name @@ -496,6 +497,39 @@ (define* (xorg-start-command-xinit #:optional (config (xorg-configuration))) (program-file "startx" exp)) +(define (startx-command-profile-service config) + ;; XXX: profile-service-type only accepts objects. + (list + (package + (name "startx-profile-package") + (version "0") + (source (xorg-start-command-xinit config)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((bin (string-append #$output "/bin"))) + (mkdir-p bin) + (symlink #$source (string-append bin "/startx")))))) + (home-page #f) + (synopsis #f) + (description #f) + (license #f)))) + +(define startx-command-service-type + (service-type + (name 'startx-command) + (extensions + (list (service-extension profile-service-type + startx-command-profile-service))) + (default-value (xorg-configuration)) + (description "Add @command{startx} to the system profile."))) + + + (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 09:28:00 2024 Received: (at 68289) by debbugs.gnu.org; 11 May 2024 13:28:00 +0000 Received: from localhost ([127.0.0.1]:48368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5mlc-00076i-2z for submit@debbugs.gnu.org; Sat, 11 May 2024 09:28:00 -0400 Received: from wolfsden.cz ([37.205.8.62]:50988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1s5mlX-00076F-Ow for 68289@debbugs.gnu.org; Sat, 11 May 2024 09:27:57 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 4ADFF289F0E; Sat, 11 May 2024 13:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434075; bh=5CdtINwiPAlsYlazKNjJn7uhI7RE1DeiG6tsEtWE9SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IG7UgVRmnZ1505niA1mTzCQDcoZj3j/2w5N6RczkJn9R+ITG89wVwre5LIsjc/KX8 7S7nrg3X1BdpnPEV3XGtBhX+LX9gu1SoKjVDPM4ddcfnKku1X7Xbow09ThyvNRUPMT 1E0LJbf55mScNNczm1+Lxmr0BTyMI4o7slYM1V3vsbfY4ti1djk2DywvAvG0FPLJwa sKV9/O4pmfgmM6jaHgDdTE3rUsHFiTzOTT6P1HSwWlWVt13VE7s/75ehOyrAwput8V uJJPpGjqLVpUnxaV8Mm0w6EEVamAFBd/YFq1gcEX+Dt0v4erWhxGKL9ChKDIeRzkeL 50pgwZz3JH3Bw2k/878vPP4ncu3jazfPAMsqWqOrY+LYi9RIa8QtPort3pZ8lTlEBz bC7NBhUjypcLnO3LaGkJiylV+gNNyiaoVCS4+L3NaZrZRrqFeO5Et1eJPhNQUIgkpc dxYGxdJ0LxsUaygxiivqlQ7LWD50mfJEt6FKbVgx19jGwYK1vstkWG4sANxsgY96Uv mC02usFTXyog8ApudWXfFo+QhmV2wyuGXylqYRqjRuVJa49c5dqkTiNrR9ztoi12Jl M1qfGehwpv+XF+pO9ZcbiUYpw8WWVCyr5bjgPNHkoFO3KKCaBt3Fho4HeyThC6BeSe FxSuKACv13k3MZlITGPhrCd4= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id E12322897B5; Sat, 11 May 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434075; bh=5CdtINwiPAlsYlazKNjJn7uhI7RE1DeiG6tsEtWE9SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IG7UgVRmnZ1505niA1mTzCQDcoZj3j/2w5N6RczkJn9R+ITG89wVwre5LIsjc/KX8 7S7nrg3X1BdpnPEV3XGtBhX+LX9gu1SoKjVDPM4ddcfnKku1X7Xbow09ThyvNRUPMT 1E0LJbf55mScNNczm1+Lxmr0BTyMI4o7slYM1V3vsbfY4ti1djk2DywvAvG0FPLJwa sKV9/O4pmfgmM6jaHgDdTE3rUsHFiTzOTT6P1HSwWlWVt13VE7s/75ehOyrAwput8V uJJPpGjqLVpUnxaV8Mm0w6EEVamAFBd/YFq1gcEX+Dt0v4erWhxGKL9ChKDIeRzkeL 50pgwZz3JH3Bw2k/878vPP4ncu3jazfPAMsqWqOrY+LYi9RIa8QtPort3pZ8lTlEBz bC7NBhUjypcLnO3LaGkJiylV+gNNyiaoVCS4+L3NaZrZRrqFeO5Et1eJPhNQUIgkpc dxYGxdJ0LxsUaygxiivqlQ7LWD50mfJEt6FKbVgx19jGwYK1vstkWG4sANxsgY96Uv mC02usFTXyog8ApudWXfFo+QhmV2wyuGXylqYRqjRuVJa49c5dqkTiNrR9ztoi12Jl M1qfGehwpv+XF+pO9ZcbiUYpw8WWVCyr5bjgPNHkoFO3KKCaBt3Fho4HeyThC6BeSe FxSuKACv13k3MZlITGPhrCd4= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v2 3/3] home: services: Add home-startx-command-service-type. Date: Sat, 11 May 2024 15:26:25 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <5197b347747fd3fb3d51a2c05b5cb676d387de8d.1715433985.git.~@wolfsden.cz> References: <5197b347747fd3fb3d51a2c05b5cb676d387de8d.1715433985.git.~@wolfsden.cz> MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Ludovic Courtès , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/home/services/desktop.scm (home-startx-command-service-type): New variable. (define-module): Export it. (startx-command-service-type): New service-type mapping. Change-Id: Id38b5dc7b9235e04e3a9a1b70a35b02e8fae95f0 --- v2: New patch in v2. gnu/home/services/desktop.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index 91465bf168..679ba31c0f 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -23,6 +23,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:use-module (gnu services xorg) #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift unclutter) #:autoload (gnu packages xorg) (setxkbmap xmodmap) @@ -43,7 +44,9 @@ (define-module (gnu home services desktop) home-unclutter-service-type home-xmodmap-configuration - home-xmodmap-service-type)) + home-xmodmap-service-type + + home-startx-command-service-type)) ;;; @@ -429,3 +432,12 @@ (define home-xmodmap-service-type (default-value (home-xmodmap-configuration)) (description "Run the @code{xmodmap} utility to modify keymaps and pointer buttons under the Xorg display server via user-defined expressions."))) + + +(define home-startx-command-service-type + (service-type + (inherit (system->home-service-type startx-command-service-type)) + (default-value (for-home (xorg-configuration))))) + +(define-service-type-mapping + startx-command-service-type => home-startx-command-service-type) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 09:29:32 2024 Received: (at 68289) by debbugs.gnu.org; 11 May 2024 13:29:33 +0000 Received: from localhost ([127.0.0.1]:48382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5mn6-00077z-Ko for submit@debbugs.gnu.org; Sat, 11 May 2024 09:29:32 -0400 Received: from wolfsden.cz ([37.205.8.62]:36434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1s5mn3-00077r-Bq for 68289@debbugs.gnu.org; Sat, 11 May 2024 09:29:30 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 051E328A413; Sat, 11 May 2024 13:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434169; bh=USmN5lIHeegmzHTVjxvizuxqQLBNmFiJekJkeXlt5e4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=y1wtnR7O4pxG9QRk9qVmzenyJ5yW2Dn8Is5shMY4VvjfmxREWYHxqELOvQM/wcDFb LFqK5g1xcPQqM6vAx8Mh8j4zDz3Ng4CxaZgVRlDfgBNaj1BtjbTdFP1D7n+JNbWNrx /5CseWShZ0fTD3q+mAiVOJDkNA3L8Va1oy15ceKUm6nR/lqDT7F4TTAF/OeqEe+cH9 HPznifcJdHTamUWq83KoOK+yJNZUKZn4La5TY7MFpe6ZBQG4Qtbh70cjVfSiXwQWSB guUPSvqLxU8aewqiOml59opKYCzC8aO2RDSVZ7h5NXO33LDPeLbvVoKob/4tgrrqYU 8UOX1CfhnTwwpRCO7mPJ1LrpULo9OL2WdZtIWmGtWzJK72BX6Yz1IbxCB4BCogts7J jxWnfgB+1so0UcuDXGhMi5+DrkBp3PMyDZA1KET3abTehKYwFQWeMc9ZpxItZiOZ6i vMM1N/H49NS2SoP7++rrqerS+dW1J8LNstTw77hHIU5ng62W+fskmriKQfSiM/Aj3z ZhUOrr3d0bYIYX63pCZYBnDNnizbTRUVdi/FL23GOy7oS+P6lv66J/Tb5Da6pxpJaG cGneijDIibvX1RIRlkplN2T9WRQ1FjzqWacy/xwnYnAIuXe2TXBYhT5ldlMZqk+OuS dIf6cL1y4/zFoUpPwRM4aLDM= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 9AA2B288CD0; Sat, 11 May 2024 13:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1715434168; bh=USmN5lIHeegmzHTVjxvizuxqQLBNmFiJekJkeXlt5e4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=khUKYYPMBYmSEN2oWWaZlYdHZlXQ8KoD6G4pj89HELvHeQ/1d83j7Y3PLD637RANX od0DxMU5EUjTm8Dm99hcU9p/ZpyMMh1oeX9Sgc7UnpTWzU42bBzg3LqOu/ub1lDf9/ nmAD86QPNwGMFY9TLSniVObO6i8JWsO7oaH7D8TJacyx5upJab5bbQ/nF4KljO+Lqz VYYFLVGZ26lJVQd+MfitNN3yog81aGg4HX45KEhlE0jGGILreP47ruoxUpDow41y/C ZuC95OAym5/yh7fmZ4wsy/WN3B2BfJP/TjIHZUo8/RLq4fRJfttYUsjNl4bmhfGbhn U4+EQCNQa0JTGk62AfHFDtULImhHx86y2FQXEf0sVYRUJomsNNYLo8D/2P3iwRzX3R L3aFlFVQMCrIpXu/4DA4nr7TL/bN4GTLEXWN/IMaHNv6zeOZmXxpGUzIxkm2/y6b4d OQ/BVTkgZfKjol1cBZF3sB7AXmUewYeiRWK69GiskFu49UxTzf3WEibObUJEpn4SWy grsYVoxP/N3BMiFtMA0WJaLocjgzdKQ+dUxkYtM7xcc/zuq6WRRQBVMDnP+MFfks1M bJyHDQ9wUmdoCPpDqaRcQjWo/E5z/WFA8Td2VmNUbVg373X9/Hpy4UA8r0fDz/YW/t PcAKxi5+7esehLn54qCB0IrE= Date: Sat, 11 May 2024 15:29:28 +0200 From: Tomas Volf <~@wolfsden.cz> To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: [bug#68289] [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87o7a9upoq.fsf@fabionatali.com> <87r0f4l4kb.fsf@fabionatali.com> <87zftpedyt.fsf@fabionatali.com> <87le53nf7o.fsf@fabionatali.com> <87edakzgfj.fsf@gnu.org> <87v83vusjw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aIcnOUQrAyTPYxRd" Content-Disposition: inline In-Reply-To: <87v83vusjw.fsf@gnu.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org, Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --aIcnOUQrAyTPYxRd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello :) On 2024-05-03 11:57:07 +0200, Ludovic Court=C3=A8s wrote: > I would extend =E2=80=98profile-service-type=E2=80=99 such that =E2=80=98= startx=E2=80=99 appears in > /run/current-system/profile/bin. > > It does mean that you need to create a computed-file that produces > /gnu/store/=E2=80=A6/bin/startx (=E2=80=98startx=E2=80=99 must be in a bi= n/ sub-directory). > > How does that sound? Right, so I finally found some time to look into it and produced a v2. I t= ook inspiration from already existing services in (gnu services xorg), and in t= he end it was not that hard to do. Let me know what you think. Have a nice day, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --aIcnOUQrAyTPYxRd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmY/crgACgkQL7/ufbZ/ walEyg/9FVSFZ1xoxlO2c9lM/NgGuCbqYzZjVj3qc7CBM6zhI8KRm1E0oxQrFl6O x6BoxocJp5sJkgz2mv3kqhZL4QupO+Gv/uWpgXyoJgXITXslUl+pM5b7hQoca2WP mHsoGxDuJKA+DPzniJ4ZVFsBN7dNL01BSptZTGLdx6fooU+8jzDpG8XTdI3Wt2da 5XmQE78P2cAhCqCdVNSbOWEnjfoPdyq+Pmmd9ZbjXtuE6NOdf3zMhM1U2aHFIVaU seTfYlS3oon6g3jw2PAg4/Y1G9raMrDbcAqUYjw96iSCrdvoJTT9sfPbAZ0qSnyt 8SUPqGw0zhK8EvHuiF2OIzpRcR7cKmfZcECO81/qatknxQHovlGxKvCKAEs9Z6iA Jem5jgcq5TWUHEcvf/nEtBLpn02FcVs/6FShlWsOsOgSmTQnYLWO47izcSaw5YL9 UpPpgYUIbBYE2cN5EetIak75hrZk3yo8WB69zUWw0tYYjaAJUknF1Kj4UhCMwSbo csdE1PD2uDqAj0BoreoTSMSsY/2cqQHHpV7PcawUcx99XSvcUHyw4Oa7LRZRlsCU pa4xoOxgZ6fz+9efXrPEoG1edRH+pVhTJ8Iw7mu+N3vXQjRANwjUnKs16Du9w8OA BhOlvY2Fi/dL8a87qeLfsDtq9Ny34KxzmMbTFpyQLw4SOvCk+18= =dmIx -----END PGP SIGNATURE----- --aIcnOUQrAyTPYxRd-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 13:34:07 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 17:34:07 +0000 Received: from localhost ([127.0.0.1]:48503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCjfC-00086s-VQ for submit@debbugs.gnu.org; Thu, 30 May 2024 13:34:07 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:48632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCjf8-00086B-NC for 68289@debbugs.gnu.org; Thu, 30 May 2024 13:34:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PoK9VhhRumLSUNhbHvQqr5mL9VGRDmkH3HOmS/o/gTY=; b=OHfN0IEbXfROIcLUay/DsIYQHP JNmIR0rwSgmjPA35xUztQCDmZ35U3djOQrQ4v7f4pmWcqxEzXzdX6oRsO5yzLPnI6Hg6pGB/nevjp cc+05SxUnHjNmhzlQSozi3NnpMCZtKK6PUwHyRan724FuJVqAZyUUDvLB4T7JMPyknf4V+tKCMAud //PawCDP94tCa2nBrQNe0vNC2L9qUsMhQ9Za98tPAgGnov7CjZLL1zOS+vwY+mPRxOOpB6IEeHxTL gAyHEWqLTpIslhrirUZf80VEBRIsStpvQyp2Wk5T8pKiiQTBuYwtPPJBXXygWDjEI+uuY+4im8Hhn 4Zw2SiVw==; Received: from [192.168.2.1] (port=45660 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1sCjbo-0000mY-0i; Thu, 30 May 2024 18:30:36 +0100 From: Arun Isaac To: 68289@debbugs.gnu.org Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Date: Thu, 30 May 2024 18:33:35 +0100 Message-ID: <87r0djkxw0.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?Q?Court=C3=A8s?= , Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi all, Thanks, Tomas for the patchset! And, thanks, Fabio and Ludo for reviewing it! I have pushed patch 1 with a few minor improvements. Could you please add some documentation to the manual in patches 2 and 3 for the services added therein? Thanks! Once that's done, please send me an updated patchset and I'll push. The changes I made to patch 1 are as follows: - I tweaked capture-stdout a little to use zero? and print out the failing command. - In the documentation, I removed the part about the convenience link. Since we will have dedicated system and home services for this, it would be better to refer to those instead. Regards, Arun From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:20:52 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 18:20:52 +0000 Received: from localhost ([127.0.0.1]:50512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCkOR-0001Mz-U4 for submit@debbugs.gnu.org; Thu, 30 May 2024 14:20:52 -0400 Received: from wolfsden.cz ([37.205.8.62]:59466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sCkOO-0001Mh-Vu for 68289@debbugs.gnu.org; Thu, 30 May 2024 14:20:50 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 87A6424BEF3; Thu, 30 May 2024 18:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093236; bh=gALTJYzecL1xy3FQl+NBhVdpYLhLzLSxo38KWUqJW40=; h=From:To:Cc:Subject:Date; b=CwZdquaV4pFC8Jwshws5zz4kTCVKU0shJGEjWfJL3+fAo6Mwdkw3Zv0Eu86ZmDXpp SZScnkChn3R/z+GxKSlPvUqwJg5G86YevZ5cRgrLcBGvep8VgyORr8APeskKfsGaf8 hAYGrWamVAtf6csbRAPJ6evT51WfXyEu5hKp8uet539HTkUO+mT25t2vliM9gKNMLz cyRCrYscXx9i/oWRzjQ0qvBq5bL+8rvvi+fW8Oh2yuflw/YqqFQ889IL5M6ruL3aBF qtriQfL5Od/1YrWqqkcD4K01jTfi8IdEhkiSc/SSgkrQeA78YPVJF6tUxdvd032q7n OmBi8hPQ5S1pA3JMWKe0CVM42mNglzYFgWqGt1utTYrzI/FNkChqs+iDM1Et4rJmex 3PcuJqQKbzSU2rLKupC4SctocMQkI5/aY7a0exK3yHlXLhxnYpzybDeZwEkMvR6Rpq OFGuEBBLSvii7GAKygGWU00QG9Zk1+SIGHX6MOdUyMX3MIaeS6pr8vIVJHX6qX9B4F Y4GAXUdXN0MnpWLu8AEIeV3Cb7K9uE5x2GZaZnLatuWvj8POLtRoQ4/Vnxme+MUENc 0ZeoYyau1zl4oO6Nlzs0PpH0GK3W6Adms5LWW43wkTe/tP5k8A+EXrUpycGipisKFA SOtJbH8pnV5LletP2Amqh/SM= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [81.17.16.72]) by wolfsden.cz (Postfix) with ESMTPSA id 773B824E302; Thu, 30 May 2024 18:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093235; bh=gALTJYzecL1xy3FQl+NBhVdpYLhLzLSxo38KWUqJW40=; h=From:To:Cc:Subject:Date; b=DrVXkyoKA3eDmpQjJEoLJVOc+N7jqFNQPo5DWQ0/KV8bVrmisgDbxZbEnIHRQRwHZ 5++T7UxX89S2n51BQClbkI2xshMOqIzSZUCUA+la8A1RkwsYW1Re0xXr/FsQ+rVynz nGbc8/7/rK914ULxJiawPt6zU5oZX8A5ymwctQPEqN54b1DS6/6kWUZEYcCP0+BbQJ qUR/kAWgj1PJ4Chqt4SBADO/+BsXnf3Z/2aKLo6nN3Syp7B8vn8NHO/Coi/M0mv4EY H9h/djc2q4BiYE8165uBTE/ZsTlKeD4ObxMNoQkIK0WZ6iZ+P+egTnF9gny0umDc/r 4HFzX0kBDzAziVVLKRgHC9cjmEZVPH2NZwPgVk2W/0NAaWfhSCWkP7z27YlDTAg7Wo NjlcOlYgZBvknJ1ODH+igFG9WmRmT5/+reYN4PUPXaq9cWvx9163KrelF+p/6awSsm oITDKZQ/+bZKsXeqxQghSFy6unJz3mF0qVBeHLXI2wAI/yAgtgxQmfRHO/jCzLhO+i ip9/dbkKBq1KE2vhW32D0nTnajMnhNszvUkB9SSDYdDiOonOlOC5ax/McyFdmnlHU5 cwdNs1+25FNkeJ72zM9wxMu6ZvMaJFebbAh5Q/Jsh4r4BbaBT0wTTb4LPhDc5abddd kcBpqeKnt6ApElRdRu1HCzNQ= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v3 1/2] services: xorg: Add startx-command-service-type. Date: Thu, 30 May 2024 20:18:17 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: arunisaac@systemreboot.net, Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/xorg.scm (startx-command-profile-service), (startx-command-service-type): New variables. (define-module): Export startx-command-service-type. Change-Id: Ia2a7c3b2d5ebf6bcfff40cb2640b17d3baf6eba0 --- doc/guix.texi | 10 ++++++++++ gnu/services/xorg.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index b07b8dce6f..2cf1e58b5f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23803,6 +23803,16 @@ X Window @end deftp +@defvar startx-command-service-type +Add @command{startx} to the system profile putting it onto the +@env{PATH}. + +The value for this service is a @code{} object which +is passed to the @code{xorg-start-command-xinit} procedure producing the +@command{startx} used. Default value is @code{(xorg-configuration)}. +@end defvar + + @node Printing Services @subsection Printing Services diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 0b9803c425..d29daa59a8 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -92,6 +92,7 @@ (define-module (gnu services xorg) xorg-start-command-xinit xinitrc xorg-server-service-type + startx-command-service-type %default-slim-theme %default-slim-theme-name @@ -496,6 +497,39 @@ (define* (xorg-start-command-xinit #:optional (config (xorg-configuration))) (program-file "startx" exp)) +(define (startx-command-profile-service config) + ;; XXX: profile-service-type only accepts objects. + (list + (package + (name "startx-profile-package") + (version "0") + (source (xorg-start-command-xinit config)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((bin (string-append #$output "/bin"))) + (mkdir-p bin) + (symlink #$source (string-append bin "/startx")))))) + (home-page #f) + (synopsis #f) + (description #f) + (license #f)))) + +(define startx-command-service-type + (service-type + (name 'startx-command) + (extensions + (list (service-extension profile-service-type + startx-command-profile-service))) + (default-value (xorg-configuration)) + (description "Add @command{startx} to the system profile."))) + + + (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:20:52 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 18:20:53 +0000 Received: from localhost ([127.0.0.1]:50515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCkOS-0001N3-9d for submit@debbugs.gnu.org; Thu, 30 May 2024 14:20:52 -0400 Received: from wolfsden.cz ([37.205.8.62]:59478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sCkOO-0001Mk-Vt for 68289@debbugs.gnu.org; Thu, 30 May 2024 14:20:50 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 6E14824CEB6; Thu, 30 May 2024 18:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093237; bh=lZquN3eJLxytJanCw1WH1Y4U9zCuvhJMd0Eq6h5Gv+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FWXd+R2RQdnqbA7TebdHgpsSrPfIxev2AffEye7LtI8FddRKnc+ijZZA/LySsNNnN flwhLDNOvyumL2Mg4PmtqxJIVNvUxzSZgqecyLrMQ0LOUk9wBPygcvNg2DfgHZCmge ckS3eHSrZD4YCO2Q6gRUgFP5rKpK2xuLRX+mJ2N0yZ9A+daTDq+Rnur+oMvpxqCDTc TSc5j7RwaGJOvOQfX3FPvMXobZosY3WKfrN27Hg+MhMvNh5zvsRQvnWKwt34XfRdjA yyIQ8Ycq5WN0h5qQ6i7kY4RsYVBTuVYzQdjVT04LRwRuGyDfelGIcmEufSM0+MJuTY +XRwDFZ/QBfBDPcHxttl542dES+dYkviCFCpifQ7A03XRRiYn+XCh3zYm2KqvIgnbv d58kWKZZoZh3aZBzx3dLPPcByunPqSXe7cyOXcEF6fjpuAXEFcpRm4En36oIycdfv+ 1e82L+wu8buYKm3QmaKFi0sjsp2Ez6/AKW3wfBzjcSGE3qs8bmkBvw4DtjTQiWQ+iO m0QZAIJGGyM74Jj8KWMjIvoAwOj4nXuVjw1+WdfIYE9Hiz9s7KT9glj1qdhSVuKdFf sEhfTihKoIHDCEqXIR0fSd2355fESZGLkTnQg/ORio+r1BhhQjkogQJsNUpxf0F1c2 bdOtFxlBa6UsarlOV+QoELIA= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [81.17.16.72]) by wolfsden.cz (Postfix) with ESMTPSA id DF6BA24D0D8; Thu, 30 May 2024 18:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093237; bh=lZquN3eJLxytJanCw1WH1Y4U9zCuvhJMd0Eq6h5Gv+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FWXd+R2RQdnqbA7TebdHgpsSrPfIxev2AffEye7LtI8FddRKnc+ijZZA/LySsNNnN flwhLDNOvyumL2Mg4PmtqxJIVNvUxzSZgqecyLrMQ0LOUk9wBPygcvNg2DfgHZCmge ckS3eHSrZD4YCO2Q6gRUgFP5rKpK2xuLRX+mJ2N0yZ9A+daTDq+Rnur+oMvpxqCDTc TSc5j7RwaGJOvOQfX3FPvMXobZosY3WKfrN27Hg+MhMvNh5zvsRQvnWKwt34XfRdjA yyIQ8Ycq5WN0h5qQ6i7kY4RsYVBTuVYzQdjVT04LRwRuGyDfelGIcmEufSM0+MJuTY +XRwDFZ/QBfBDPcHxttl542dES+dYkviCFCpifQ7A03XRRiYn+XCh3zYm2KqvIgnbv d58kWKZZoZh3aZBzx3dLPPcByunPqSXe7cyOXcEF6fjpuAXEFcpRm4En36oIycdfv+ 1e82L+wu8buYKm3QmaKFi0sjsp2Ez6/AKW3wfBzjcSGE3qs8bmkBvw4DtjTQiWQ+iO m0QZAIJGGyM74Jj8KWMjIvoAwOj4nXuVjw1+WdfIYE9Hiz9s7KT9glj1qdhSVuKdFf sEhfTihKoIHDCEqXIR0fSd2355fESZGLkTnQg/ORio+r1BhhQjkogQJsNUpxf0F1c2 bdOtFxlBa6UsarlOV+QoELIA= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v3 2/2] home: services: Add home-startx-command-service-type. Date: Thu, 30 May 2024 20:18:18 +0200 Message-ID: <05fe72a985dc3c56516958059555b534415738b5.1717093098.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: arunisaac@systemreboot.net, Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/home/services/desktop.scm (home-startx-command-service-type): New variable. (define-module): Export it. (startx-command-service-type): New service-type mapping. Change-Id: Id38b5dc7b9235e04e3a9a1b70a35b02e8fae95f0 --- doc/guix.texi | 9 +++++++++ gnu/home/services/desktop.scm | 14 +++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2cf1e58b5f..1f2e45f525 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46376,6 +46376,15 @@ Desktop Home Services @end table @end deftp +@defvar home-startx-command-service-type +Add @command{startx} to the home profile putting it onto the @env{PATH}. + +The value for this service is a @code{} object which +is passed to the @code{xorg-start-command-xinit} procedure producing the +@command{startx} used. Default value is @code{(xorg-configuration)}. +@end defvar + + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index 91465bf168..679ba31c0f 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -23,6 +23,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:use-module (gnu services xorg) #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift unclutter) #:autoload (gnu packages xorg) (setxkbmap xmodmap) @@ -43,7 +44,9 @@ (define-module (gnu home services desktop) home-unclutter-service-type home-xmodmap-configuration - home-xmodmap-service-type)) + home-xmodmap-service-type + + home-startx-command-service-type)) ;;; @@ -429,3 +432,12 @@ (define home-xmodmap-service-type (default-value (home-xmodmap-configuration)) (description "Run the @code{xmodmap} utility to modify keymaps and pointer buttons under the Xorg display server via user-defined expressions."))) + + +(define home-startx-command-service-type + (service-type + (inherit (system->home-service-type startx-command-service-type)) + (default-value (for-home (xorg-configuration))))) + +(define-service-type-mapping + startx-command-service-type => home-startx-command-service-type) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:27:26 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 18:27:26 +0000 Received: from localhost ([127.0.0.1]:50817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCkUo-0001ds-4f for submit@debbugs.gnu.org; Thu, 30 May 2024 14:27:26 -0400 Received: from wolfsden.cz ([37.205.8.62]:60892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sCkUm-0001dg-4j for 68289@debbugs.gnu.org; Thu, 30 May 2024 14:27:25 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8461824E0A6; Thu, 30 May 2024 18:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093631; bh=kI+cxuE54rlHjOgfPKtMqVfLpTxLj9ty8dER7LJomlY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OVcTgkncJ6GCY48lW6ejiHe0ctwcYlvHEu4grefjXXgE4B23dracNmUDgfIlmYRWY Gd87nmYtTYQa9hExnLLkU+QrYiBHAy6xsfV0ICN88xUKs9qunok+YEE6bNzOrc1ACE NMEQ/6cEN97DlKPXglZV8IOfUykPp/fx8VW76HPjbDABOumaLtRV4eNfbEm3hCLshC y9M1I0VTLmfd5RMk23Rmm2OEoR6q+4caqxt4jcS6gHS8bgXkHbqhX1MYss4ewEq+zV aaW1ZLdSgyFNL0TnoYTi7BKKCLHmn4hYzF37inGMQiIhkVd9/PXWvfPUQbHmNNqDQ6 skChSTknAT9442xpTE7uo9YjKz/wY38sb7sNs52A1SCi6CDe01P5DpxgVBgw2eqLLW t/OpFFy0rjIjo4wXEbRe4Adx7Q1vtwqYPkcgzrQgRm4mMwJib/f/Vc2naKLPzmUTJh zqyBH+tGD5f5BTA3hxBQtnbqI7Zp50y3DPiZ2WamNLJdhQZ++4TrioCZXwYlscGLz+ g8YB7Qnuuej53xvj5L2opjOsVH6VR3Jv6/7fi/B05u16oJIFsw0Sk7Eqazl1I0CiT0 9BPGOH4I27UrKXfaNGx3RjHwj5xeNcvMlSrI2e0gVtVvkUNk0CQRyn6R6ctLsczct6 u+WxJjEWPvi9S8Ol+NTopLB0= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [81.17.16.72]) by wolfsden.cz (Postfix) with ESMTPSA id DA23124DF8C; Thu, 30 May 2024 18:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093631; bh=kI+cxuE54rlHjOgfPKtMqVfLpTxLj9ty8dER7LJomlY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OVcTgkncJ6GCY48lW6ejiHe0ctwcYlvHEu4grefjXXgE4B23dracNmUDgfIlmYRWY Gd87nmYtTYQa9hExnLLkU+QrYiBHAy6xsfV0ICN88xUKs9qunok+YEE6bNzOrc1ACE NMEQ/6cEN97DlKPXglZV8IOfUykPp/fx8VW76HPjbDABOumaLtRV4eNfbEm3hCLshC y9M1I0VTLmfd5RMk23Rmm2OEoR6q+4caqxt4jcS6gHS8bgXkHbqhX1MYss4ewEq+zV aaW1ZLdSgyFNL0TnoYTi7BKKCLHmn4hYzF37inGMQiIhkVd9/PXWvfPUQbHmNNqDQ6 skChSTknAT9442xpTE7uo9YjKz/wY38sb7sNs52A1SCi6CDe01P5DpxgVBgw2eqLLW t/OpFFy0rjIjo4wXEbRe4Adx7Q1vtwqYPkcgzrQgRm4mMwJib/f/Vc2naKLPzmUTJh zqyBH+tGD5f5BTA3hxBQtnbqI7Zp50y3DPiZ2WamNLJdhQZ++4TrioCZXwYlscGLz+ g8YB7Qnuuej53xvj5L2opjOsVH6VR3Jv6/7fi/B05u16oJIFsw0Sk7Eqazl1I0CiT0 9BPGOH4I27UrKXfaNGx3RjHwj5xeNcvMlSrI2e0gVtVvkUNk0CQRyn6R6ctLsczct6 u+WxJjEWPvi9S8Ol+NTopLB0= Date: Thu, 30 May 2024 20:27:10 +0200 From: Tomas Volf <~@wolfsden.cz> To: Arun Isaac Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Message-ID: References: <87r0djkxw0.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hs/9CqoNRc5s2ryf" Content-Disposition: inline In-Reply-To: <87r0djkxw0.fsf@systemreboot.net> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: 68289@debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= , Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --hs/9CqoNRc5s2ryf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, On 2024-05-30 18:33:35 +0100, Arun Isaac wrote: > > Hi all, > > Thanks, Tomas for the patchset! And, thanks, Fabio and Ludo for > reviewing it! > > I have pushed patch 1 with a few minor improvements. Thank you for taking the time to merge this, all your changes look good :) > Could you please add some documentation to the manual in patches 2 and 3 for > the services added therein? Thanks! Once that's done, please send me an > updated patchset and I'll push. I have sent v3 containing just the two later patches. I sent it to this issue and also took the liberty of CC-ing you directly per the text above. Hope it is what you have imagined. Uff, only now I realize I forgot to update the commit messages :/. I will sent v4. > > The changes I made to patch 1 are as follows: > - I tweaked capture-stdout a little to use zero? and print out the > failing command. > - In the documentation, I removed the part about the convenience > link. Since we will have dedicated system and home services for this, > it would be better to refer to those instead. > > Regards, > Arun Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --hs/9CqoNRc5s2ryf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmZYxP4ACgkQL7/ufbZ/ wamLhg/+NsyMbEGa4iqZuP8OIFh9Z2rK9eV+qgK5pvuY7toGeP7ygojqR+9QXkol i6dUl6atQ/qoeC3J9yyqYsxwv44z+CMVjZ3mjP33LFqqknSoy6igxET+W8W7yTCA Eymm5rqEGTvMyWYQNFtnc47XKDitLXBPa+PfZFHm4jfBvyHzgs33ov2BBlsbL9/e ACumfbOjBHTB6Ws/lMs/Ky7UHUafSEZZzSfiGGeI2KkorbGRWC8QqjeIXn+eyub5 C/AroOKZAQEu+kq2Dio6jpHkqal/nu+Rk39kZCsdxOkh3hKbATT5nh++UtK4KbwE nL92v5N5adjPkFCgajznY3FCplv8FgQBQ2wRDDRIpRfFu1JWHzpikkrrgLsDmOhK iu6atsDp1HrZgv/ahcRQaIyXeSlmoZRcMR4iK2IcLw6oRCyy4QzKws4r4kNnWner +Sj/zWJt8BSu1+sRQ/Y50iRzupY4wA53q/jXFt2tPuqZi02/d28HtHGmFYFapJGl O1JyKxiY7LpPHYrQnBpbRT90T5ugKgGP8meoIA7g6T2WlQ3gwURQwg2OErus5It6 0NaLR7gihYa913VXPOsU1NDSD5lUcKYoubiIHlVQ0AlMG9Tn6x64UFyrip4CL6AI k/4/JxVz//73nFwXgwT5L3DkABldWuCXWbDFhlRg+MryhUJdi0U= =6fi7 -----END PGP SIGNATURE----- --hs/9CqoNRc5s2ryf-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:30:23 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 18:30:23 +0000 Received: from localhost ([127.0.0.1]:50923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCkXe-0001lj-Lk for submit@debbugs.gnu.org; Thu, 30 May 2024 14:30:23 -0400 Received: from wolfsden.cz ([37.205.8.62]:54884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sCkXc-0001lO-Cf for 68289@debbugs.gnu.org; Thu, 30 May 2024 14:30:21 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 47F8024CCBC; Thu, 30 May 2024 18:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093807; bh=4OG3QQB/O1KjkROkT2/AKo+Go7w9BjdQ9pc/yRLwkLo=; h=From:To:Cc:Subject:Date; b=d8Otfhx4R4eMLTLQgG9hwm+vbxVDeNhnEXaAVqYmmb84fOU0MB+kbKlvFFPJHha7n 4AmcqszdqE7enmCIQB2GBxTsmUpMzlkezBYG+CdzZzm6S97CVhWyQYYJfET4Q+BapD O31SuOwba/65PJjFjN1c6A8W/3076GNQ0D4IKl8thTkhSxDRpaJRrLQy4GiG7eDXl1 /Brxk/QzvwRRm82Ks6AyflUabL/EAHVQIxLHn/b3cY1J5Si91HIuGz24Zqcun16iFF pNArlIvhxQfXmdfaz8CXi5LKpPIY+ZWBAYwY2rMZonLRYGWLxLnZ3ABoHFc+yzuso1 aeYnaCQZS44YyJDcKuy2T3KIGcCnW4MiOW8h7rhsKaCgQm6YIlwMp1wN9eyAnm0P5a ckAcV7o87wygt884bRJT/Zru2l/bxDeYBdMyhwk6KQQtK7Iv/1LO/gSLr30n6n+8nu ARjnKSc1YMvx6dGvjLW8LCH6fIGZwBYkOwqkOwjo1sstsk0rV2MntqQ2kcqKUTfDJz dFXskEe/ZiTLDDy+oK06+tmvpwnPyjFaic5VjGBIIEAOJcemd3ITE2oULx8QOmn8/J z9TG97RZ97SQy5Eu81AabDLtUWzsvUXOp6GTjgrLkJwdRu1lsOikYD/BpgAGwbBR09 MOWdcPmLcZQlsNSfuE1IE76k= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [81.17.16.72]) by wolfsden.cz (Postfix) with ESMTPSA id 90DC424BEF9; Thu, 30 May 2024 18:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093806; bh=4OG3QQB/O1KjkROkT2/AKo+Go7w9BjdQ9pc/yRLwkLo=; h=From:To:Cc:Subject:Date; b=K/VYQEw45CUpEyAPf8emINKK8pX7APiK58KutHxZeEk9kmo0gZ8qq7dmVstHCR9Af xnbgqHkVeYWINfiCRgHlpcTRvpmAwz3pFytvwYMwU3iI+9Xjo/YCxKMNEENE3OatTw AL+t3UVtfDQdoHOFkFiyfIGVFzJJ5XxWpwljTiTb800yZuuK6ZHtjn4jVd6r8DHjV/ 1qsLhCpNIrXGdq/5l6xkMxL6zWEe3VYl5pr0QhDYjRmd3gTBYcMOnuP/t7q63yXEoM 88HGvxnnkQ4lqc6ox/SCHwK9Pzj+jmmnAj49y4jprNi0gMmQellDjiwPiXBlZ+nu8V 3GiDnd29nkVpZykP8VF1xg9YXjokZRBOXPh2NWVOCYfwEYVodj5znrrz4ul/T+YMIy XiiB7TqHK+zo0MxOESwEGfNTo5FM7TZXiz4L5PjukGGHevMjxDj3pY8PJNobbtk0uB jcMEAcQEZIF/G5SXV/SA9bSL4raR+OlRHVFWMhsk2fvPP8f4LZKD//RNu4U+w5Bxm1 UCIY6C0QfXoHXDwLtPUOBGjz+PIB9cT11jW3KKJr/D2dF45Bl/zAcbZoKipg++K/9i LaQoRJFrw9TFuj7N2sQfQ7ylQt9CjWuJrIPvYkRX2LsCCLPmTdbOV+5JNW++7z81eT VLwPNB+6W5rXLGJxxoiUv/bs= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v4 1/2] services: xorg: Add startx-command-service-type. Date: Thu, 30 May 2024 20:29:53 +0200 Message-ID: <74d9f9bb390a51aa5d8b7d6deec605d59f1c43d7.1717093794.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: arunisaac@systemreboot.net, Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/xorg.scm (startx-command-profile-service), (startx-command-service-type): New variables. (define-module): Export startx-command-service-type. * doc/guix.texi (X Window): Document it. Change-Id: Ia2a7c3b2d5ebf6bcfff40cb2640b17d3baf6eba0 --- doc/guix.texi | 10 ++++++++++ gnu/services/xorg.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index b07b8dce6f..2cf1e58b5f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23803,6 +23803,16 @@ X Window @end deftp +@defvar startx-command-service-type +Add @command{startx} to the system profile putting it onto the +@env{PATH}. + +The value for this service is a @code{} object which +is passed to the @code{xorg-start-command-xinit} procedure producing the +@command{startx} used. Default value is @code{(xorg-configuration)}. +@end defvar + + @node Printing Services @subsection Printing Services diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 0b9803c425..d29daa59a8 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -92,6 +92,7 @@ (define-module (gnu services xorg) xorg-start-command-xinit xinitrc xorg-server-service-type + startx-command-service-type %default-slim-theme %default-slim-theme-name @@ -496,6 +497,39 @@ (define* (xorg-start-command-xinit #:optional (config (xorg-configuration))) (program-file "startx" exp)) +(define (startx-command-profile-service config) + ;; XXX: profile-service-type only accepts objects. + (list + (package + (name "startx-profile-package") + (version "0") + (source (xorg-start-command-xinit config)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((bin (string-append #$output "/bin"))) + (mkdir-p bin) + (symlink #$source (string-append bin "/startx")))))) + (home-page #f) + (synopsis #f) + (description #f) + (license #f)))) + +(define startx-command-service-type + (service-type + (name 'startx-command) + (extensions + (list (service-extension profile-service-type + startx-command-profile-service))) + (default-value (xorg-configuration)) + (description "Add @command{startx} to the system profile."))) + + + (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:30:23 2024 Received: (at 68289) by debbugs.gnu.org; 30 May 2024 18:30:23 +0000 Received: from localhost ([127.0.0.1]:50925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCkXf-0001lm-3e for submit@debbugs.gnu.org; Thu, 30 May 2024 14:30:23 -0400 Received: from wolfsden.cz ([37.205.8.62]:54890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sCkXc-0001lQ-Ck for 68289@debbugs.gnu.org; Thu, 30 May 2024 14:30:21 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id D0CDC24BD59; Thu, 30 May 2024 18:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093808; bh=GsZe735S9MZVMHpP1OoBUWMpF2JQdPXAMCrDC+Aq080=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gav7eSuexDr79hO+k7vn105gVW8g8OZye0rVnLv2fflZdTly6rstX5a3TsUjvzU9T bY2h7TJ4J9XQBs7H81zURr8JXP0dm9l4qAFH5nNzs/CR4Kt2jGCCeMtrm708zaHJrb ak9IFQGBZ4s8iWW/a3mZEiVyUeMYwaFT3yQ8mJWc1orvEh/+2IEBy9ZH4IkZaVt7A4 cGreXaLckweSxYa/QmFHVcL3lseJM1AEMvCTvuzErZ8RBgOPH/Q5kx3zQIiPctIgPu cDt8tHbTTjjYb1M/WJlFEy1ZusiC0ZzWFwrzm9vakBg4m81soYPN1saUDa/T7km3/p S67eOWWX5xRLVhAUakWqOt2i1TBu0EUAIN3ULe/wJULcc+mQlAV2KGvZGX84nVa1G1 BCCnHEAL8ryRQvvr7e/1Njshf8U78ZIQt3FbsigZ10289O6jMAGdRybqjP/Dqfd0T7 zBps1T4FU3QOKQKJ7z2fsc2pxQv0UbBKuadZIW+y4hfnlLg02K3bWP+QvCf9NKXAzM TRTY35HeTHh2jB/d0GVzq2vAALGipn4xHhJOBTMiQmOsS1tfUdIuiNP8jxnX+ssyT/ mQmF1EOrohQ0zdCdRbqbsrQ03UqlKsSF0ZKeWNMPYJfl23btfRVbkgn97NENmSPSnl i+I7GmXvYcY4j17lrNtuSHVA= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [81.17.16.72]) by wolfsden.cz (Postfix) with ESMTPSA id 46F4D24E287; Thu, 30 May 2024 18:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1717093808; bh=GsZe735S9MZVMHpP1OoBUWMpF2JQdPXAMCrDC+Aq080=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gav7eSuexDr79hO+k7vn105gVW8g8OZye0rVnLv2fflZdTly6rstX5a3TsUjvzU9T bY2h7TJ4J9XQBs7H81zURr8JXP0dm9l4qAFH5nNzs/CR4Kt2jGCCeMtrm708zaHJrb ak9IFQGBZ4s8iWW/a3mZEiVyUeMYwaFT3yQ8mJWc1orvEh/+2IEBy9ZH4IkZaVt7A4 cGreXaLckweSxYa/QmFHVcL3lseJM1AEMvCTvuzErZ8RBgOPH/Q5kx3zQIiPctIgPu cDt8tHbTTjjYb1M/WJlFEy1ZusiC0ZzWFwrzm9vakBg4m81soYPN1saUDa/T7km3/p S67eOWWX5xRLVhAUakWqOt2i1TBu0EUAIN3ULe/wJULcc+mQlAV2KGvZGX84nVa1G1 BCCnHEAL8ryRQvvr7e/1Njshf8U78ZIQt3FbsigZ10289O6jMAGdRybqjP/Dqfd0T7 zBps1T4FU3QOKQKJ7z2fsc2pxQv0UbBKuadZIW+y4hfnlLg02K3bWP+QvCf9NKXAzM TRTY35HeTHh2jB/d0GVzq2vAALGipn4xHhJOBTMiQmOsS1tfUdIuiNP8jxnX+ssyT/ mQmF1EOrohQ0zdCdRbqbsrQ03UqlKsSF0ZKeWNMPYJfl23btfRVbkgn97NENmSPSnl i+I7GmXvYcY4j17lrNtuSHVA= From: Tomas Volf <~@wolfsden.cz> To: 68289@debbugs.gnu.org Subject: [PATCH v4 2/2] home: services: Add home-startx-command-service-type. Date: Thu, 30 May 2024 20:29:54 +0200 Message-ID: <290639a3e62452e72d6ff9b816bcccae7c8dca90.1717093794.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <74d9f9bb390a51aa5d8b7d6deec605d59f1c43d7.1717093794.git.~@wolfsden.cz> References: <74d9f9bb390a51aa5d8b7d6deec605d59f1c43d7.1717093794.git.~@wolfsden.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68289 Cc: arunisaac@systemreboot.net, Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/home/services/desktop.scm (home-startx-command-service-type): New variable. (define-module): Export it. (startx-command-service-type): New service-type mapping. * doc/guix.texi (Guix Home Services): Document it. Change-Id: Id38b5dc7b9235e04e3a9a1b70a35b02e8fae95f0 --- doc/guix.texi | 9 +++++++++ gnu/home/services/desktop.scm | 14 +++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2cf1e58b5f..1f2e45f525 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46376,6 +46376,15 @@ Desktop Home Services @end table @end deftp +@defvar home-startx-command-service-type +Add @command{startx} to the home profile putting it onto the @env{PATH}. + +The value for this service is a @code{} object which +is passed to the @code{xorg-start-command-xinit} procedure producing the +@command{startx} used. Default value is @code{(xorg-configuration)}. +@end defvar + + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index 91465bf168..679ba31c0f 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -23,6 +23,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:use-module (gnu services xorg) #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift unclutter) #:autoload (gnu packages xorg) (setxkbmap xmodmap) @@ -43,7 +44,9 @@ (define-module (gnu home services desktop) home-unclutter-service-type home-xmodmap-configuration - home-xmodmap-service-type)) + home-xmodmap-service-type + + home-startx-command-service-type)) ;;; @@ -429,3 +432,12 @@ (define home-xmodmap-service-type (default-value (home-xmodmap-configuration)) (description "Run the @code{xmodmap} utility to modify keymaps and pointer buttons under the Xorg display server via user-defined expressions."))) + + +(define home-startx-command-service-type + (service-type + (inherit (system->home-service-type startx-command-service-type)) + (default-value (for-home (xorg-configuration))))) + +(define-service-type-mapping + startx-command-service-type => home-startx-command-service-type) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 17:43:29 2024 Received: (at 68289-done) by debbugs.gnu.org; 30 May 2024 21:43:29 +0000 Received: from localhost ([127.0.0.1]:52681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCnYX-00015N-0F for submit@debbugs.gnu.org; Thu, 30 May 2024 17:43:29 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:33456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCnYT-00015C-UV for 68289-done@debbugs.gnu.org; Thu, 30 May 2024 17:43:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=R7rtB/U/k9y3LB+i4mnQLLe9rZDbaH4b9pyWebTRd8c=; b=WITYpGUJAMev9+ZOLHSSRsXUfT fdtAR5jgPyyvFSKaEDr6VPO9BgrKfcVm4f5vUTavI1DTv7/JirMvic9JxTGVnqzWReyCT3VDsc753 23oTxnW//0EY9AocVgEmA5jUiWw8LxpNDpZV486omAFUKLbPCrb0kX/oz8CN8DTmIJ5vRJB8D+wJ1 dy/nCJl2bSdk+p2TUSNqxRg/XsYu4olbWk37u0lR+YLxBEAamefRLqCrJw5q4F6uYP8xwGrDP2Ook e+uj7NyFehiCvjQZqZYuDOuABByPsmaUxWCcg7W+/2jbG/vnZiPmzJ07QMLAFBN4kUCq4njy7cJ3j HDKYT5hQ==; Received: from [192.168.2.1] (port=38196 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1sCnVC-0001zi-2g; Thu, 30 May 2024 22:40:03 +0100 From: Arun Isaac To: 68289-done@debbugs.gnu.org Subject: Re: [PATCH] services: xorg: Add xorg-start-command-xinit procedure. Date: Thu, 30 May 2024 22:43:02 +0100 Message-ID: <87plt3j7rt.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68289-done Cc: Arun Isaac , Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?Q?Court=C3=A8s?= , Fabio Natali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pushed with minor tweaks. Thank you! From unknown Sun Sep 21 08:58:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 28 Jun 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator