From unknown Mon Jun 16 23:36:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48974 <48974@debbugs.gnu.org> To: bug#48974 <48974@debbugs.gnu.org> Subject: Status: A possible shepherd bug (it's very minor) Reply-To: bug#48974 <48974@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:36:56 +0000 retitle 48974 A possible shepherd bug (it's very minor) reassign 48974 guix submitter 48974 Joshua Branson severity 48974 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 09:26:32 2021 Received: (at submit) by debbugs.gnu.org; 12 Jun 2021 13:26:32 +0000 Received: from localhost ([127.0.0.1]:40638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls3ei-0000Sc-2j for submit@debbugs.gnu.org; Sat, 12 Jun 2021 09:26:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:41882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls3eg-0000SV-R1 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 09:26:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls3eg-0006St-Kk for bug-guix@gnu.org; Sat, 12 Jun 2021 09:26:30 -0400 Received: from mx1.dismail.de ([78.46.223.134]:22543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls3ee-0006XS-TT for bug-guix@gnu.org; Sat, 12 Jun 2021 09:26:30 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 1bfe15b8 for ; Sat, 12 Jun 2021 15:26:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=date :message-id:from:to:subject; s=20190914; bh=sv+o4Ky6j6FfTiI+5ZkB z22wcEh3oz3ZorbeCr2jlbs=; b=hB++7Go23y3WWujd+CidksOcawZHKZqG05Z2 q5EhOl/pehoc9a4oLMIV8DDKkn77Y78FJXml9htgNpUd+MeEDdgRxfVtt64zJKEW xXIzZWon43ffmyYjn3HGlJtDY6YBYHZG4TjFrcu7hd1ln3zKFY56c9nwUmtyg73Y h7qhY+2vmzbckk7ntcKeU/rPah9ttZaP7NBX9b9RQL8ByLLsj6oxARqpdoc/HHOK o+pmzbD/Qt6HyrHaxINXg8qY/efLAJsUZ0xqApYnV5lr7hF3lwWBtuSYP8ctBUcy yphHJj5yYPwaYg5Y++FIjXr5puxvn3EKoM+mYTxCUuIrfekJGg== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id a6b70405 for ; Sat, 12 Jun 2021 15:26:26 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 7bfc211c for ; Sat, 12 Jun 2021 15:26:26 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 04001104 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Sat, 12 Jun 2021 15:26:25 +0200 (CEST) Date: Sat, 12 Jun 2021 09:26:23 -0400 Message-Id: <87wnqz43k0.fsf@dismail.de> From: Joshua Branson To: bug-guix@gnu.org Subject: A possible shepherd bug (it's very minor) Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit 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: -2.4 (--) Hello! I've had this issue every since I enabled automatic login on my guix system like so: #+BEGIN_SRC scheme (define %my-desktop-services (modify-services %desktop-services (mingetty-service-type config => (mingetty-configuration (inherit config) ;;auto login as joshua (auto-login "joshua"))))) (operating-system ... (services (list %my-desktop-services))) #+END_SRC This is the "error message" #+BEGIN_SRC sh This is the GNU system. Welcome dobby login: joshua (automatic login) This is the GNU operating system, welcome! Cannot make/remove an entry for the specified session #+END_SRC Essentially, mingetty tries to auto log me in, but I am using desktop services. So mingetty tries to log me in, before many of the desktop services are started. However, I guess this doesn't work. Meaning, my autostart sway script is NOT run, until AFTER all of the desktop services are started. WHICH IS PROBABLY A GOOD IDEA. I would rather log in, when my desktop services have started, not before. BUT the minor issue is that after I log in, =users= reports: #+BEGIN_SRC sh joshua@dobby ~> users joshua joshua joshua joshua joshua joshua #+END_SRC So it looks like 6 versions of myself are logged in by the time I am officially logged in and I auto start sway via .bash_profile: #+BEGING_SRC sh # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then . ~/.bashrc; fi # shepherd if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then export MOZ_ENABLE_WAYLAND=1 export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/ XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS # this may fix a bug that I have with termite confusing backspace as space in guix environment # export TERM=linux shepherd -c /home/joshua/.config/shepherd/init.scm & exec dbus-run-session sway fi #+END_SRC I'm guessing the root cause is that the shepherd starts most services sequentially at the moment. Anyway, I thought I'd share a minor issue with you all! Thanks! Joshua Branson From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 15:39:26 2021 Received: (at 48974) by debbugs.gnu.org; 12 Jun 2021 19:39:26 +0000 Received: from localhost ([127.0.0.1]:42030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls9Ta-0005di-80 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 15:39:26 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:23133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls9TX-0005dV-F2 for 48974@debbugs.gnu.org; Sat, 12 Jun 2021 15:39:24 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4G2ShS4chnz3wGN; Sat, 12 Jun 2021 21:39:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1623526760; bh=OpkJ03DeuznRhtJmtyjbtTJ54yby/uslGVcYil6MXwU=; h=Subject:From:To:Date:In-Reply-To:References; b=CT9ckVT2opS1Jo2HP1nCXqa/ONm3+z1tkQ8rJKkI7oXXPLzY+ko6fICqW+s6Z5hPN xNHQOSoVp4THl3HzBupD1Lkxpsb6bfzVjPJTMvehYNwSX+njRvTVKtAs6arqsoyTfb WPl9kcmbOSuaG3liyzOfzXkJYr44C+lVtud6864k= Message-ID: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> Subject: Re: A possible shepherd bug (it's very minor) From: Leo Prikler To: Joshua Branson , 48974@debbugs.gnu.org Date: Sat, 12 Jun 2021 21:39:18 +0200 In-Reply-To: <87wnqz43k0.fsf@dismail.de> References: <87wnqz43k0.fsf@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 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 (---) Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: > Hello! > > I've had this issue every since I enabled automatic login on my guix > system like so: > > #+BEGIN_SRC scheme > (define %my-desktop-services > (modify-services > %desktop-services > (mingetty-service-type config => > (mingetty-configuration > (inherit config) > ;;auto login as joshua > (auto-login "joshua"))))) > > (operating-system > ... > (services (list %my-desktop-services))) > #+END_SRC I am sorry to say this, but rather than this being (just) a bug with shepherd, your config looks seriously borked. Why are you asking Guix to autologin you on *every available console*? Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 16:09:20 2021 Received: (at 48974) by debbugs.gnu.org; 12 Jun 2021 20:09:20 +0000 Received: from localhost ([127.0.0.1]:42087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls9wW-0006R5-Gg for submit@debbugs.gnu.org; Sat, 12 Jun 2021 16:09:20 -0400 Received: from mx1.dismail.de ([78.46.223.134]:3894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls9wU-0006Qs-Ud for 48974@debbugs.gnu.org; Sat, 12 Jun 2021 16:09:20 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id ea8cfb92; Sat, 12 Jun 2021 22:09:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:in-reply-to:references; s=20190914; bh=h3 UfFaSGuCf5d4o5FReABaPpS9i6GHKDi/XgZ1Tkg5Q=; b=eyh/IyFDXLVTRRDy2m 7yiVzrwWlMO6Kctdq/bsJ5MKfIl8FFI73OvUsPJgsYPpSoEq+aAgcBVB3YRIKg/D rqU9kfA97oczWTZIbo4lZRPXPGD6p770L74otaJhpaUdA2tT1ufAEnTzd0/RN9uz 5i901PJJEgjyDlZOMk9DYJweAzGYwSPuwDRB2aHFambEeUSo5mRulIlbkwtbeLLr wVxs+cXSKENYQkuLKjz8QBsE/c8d2/N1iCgxIfNrTbtCmEyBjsimBGGgKx0XjN9L 7LhLntc3Felkv+CBVVqlZMyhHg6WfWIkBab3QFuYG7AwGwtKtK0gttJAVzmg42Pj U30w== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 92ff52bb; Sat, 12 Jun 2021 22:09:11 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 5d481f02; Sat, 12 Jun 2021 22:09:11 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2c8ae95e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sat, 12 Jun 2021 22:09:11 +0200 (CEST) MIME-Version: 1.0 Date: Sat, 12 Jun 2021 20:09:10 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.14.0a From: jbranso@dismail.de Message-ID: <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> Subject: Re: A possible shepherd bug (it's very minor) To: "Leo Prikler" , 48974@debbugs.gnu.org In-Reply-To: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974 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 (-) June 12, 2021 3:39 PM, "Leo Prikler" wrot= e:=0A=0A> Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson:= =0A> =0A>> Hello!=0A>> =0A>> I've had this issue every since I enabled au= tomatic login on my guix=0A>> system like so:=0A>> =0A>> #+BEGIN_SRC sche= me=0A>> (define %my-desktop-services=0A>> (modify-services=0A>> %desktop-= services=0A>> (mingetty-service-type config =3D>=0A>> (mingetty-configura= tion=0A>> (inherit config)=0A>> ;;auto login as joshua=0A>> (auto-login "= joshua")))))=0A>> =0A>> (operating-system=0A>> ...=0A>> (services (list %= my-desktop-services)))=0A>> #+END_SRC=0A> =0A> I am sorry to say this, bu= t rather than this being (just) a bug with=0A=0AThank you for speaking so= gently! :)=0A=0A> shepherd, your config looks seriously borked. Why are = you asking Guix=0A> to autologin you on *every available console*?=0A=0AH= AHAHA! That's what I'm doing! I forgot that! Honestly, I did that, becaus= e I=0Acouldn't figure out how to code "just auto log into console 1 ONLY"= . :)=0A=0AWould you mind explaining how bad of a decision this is? Is thi= s a BAD security practice?=0A=0AI'll tell you what, why don't we leave th= is "bug" open for a week...I'll try to write=0Athe code that does what I = want, and I'll email the answer.=0A=0AThen I'll edit the manual to provid= e an example!=0A=0AThanks Leo (You sir, are a superstar!),=0A=0AJoshua=0A= =0A> Regards,=0A> Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 17:13:26 2021 Received: (at 48974) by debbugs.gnu.org; 12 Jun 2021 21:13:26 +0000 Received: from localhost ([127.0.0.1]:42187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsAwY-00084O-4K for submit@debbugs.gnu.org; Sat, 12 Jun 2021 17:13:26 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:26757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsAwV-00084F-Td for 48974@debbugs.gnu.org; Sat, 12 Jun 2021 17:13:25 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4G2Vmv24P3z1LB1y; Sat, 12 Jun 2021 23:13:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4G2Vmv24P3z1LB1y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1623532399; bh=M9GhlLMfXMD+YAO+Hesp9ouLHU3jA4MjfZq63NYOEq0=; h=Subject:From:To:Date:In-Reply-To:References:From; b=ZVL4EzI1BE951lboFtWnxFBeJTWW96fhLJ9TiSpnHxnw438jHikDRmTUwqlAJjKRr 6ciB3KufQINetdCyOp462Zf3K+Mpe9X1+qrlaWoFqvp1AJ83XAMFtMOUtky5K3YgdW /ewTsBCrtr/o6ZS/0BD5YBOStHEmr5fmPV164gWI= Message-ID: <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> Subject: Re: A possible shepherd bug (it's very minor) From: Leo Prikler To: jbranso@dismail.de, 48974@debbugs.gnu.org Date: Sat, 12 Jun 2021 23:13:18 +0200 In-Reply-To: <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 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, Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jbranso@dismail.de: > June 12, 2021 3:39 PM, "Leo Prikler" > wrote: > > > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: > > > > > Hello! > > > > > > I've had this issue every since I enabled automatic login on my > > > guix > > > system like so: > > > > > > #+BEGIN_SRC scheme > > > (define %my-desktop-services > > > (modify-services > > > %desktop-services > > > (mingetty-service-type config => > > > (mingetty-configuration > > > (inherit config) > > > ;;auto login as joshua > > > (auto-login "joshua"))))) > > > > > > (operating-system > > > ... > > > (services (list %my-desktop-services))) > > > #+END_SRC > > > > I am sorry to say this, but rather than this being (just) a bug > > with > > Thank you for speaking so gently! :) > > > shepherd, your config looks seriously borked. Why are you asking > > Guix > > to autologin you on *every available console*? > > HAHAHA! That's what I'm doing! I forgot that! Honestly, I did that, > because I > couldn't figure out how to code "just auto log into console 1 ONLY". > :) > > Would you mind explaining how bad of a decision this is? Is this a > BAD security practice? It is seriously bad practice. With just one TTY, you can usually suspend it with programs such as vlock, plus it's expected that you actually sit in front of the given TTY when the autologin happens. With all TTYs though, anyone could switch to the other and "lol, now I'm jbranso". The only configuration, that could possibly be worse is autologin root :P (Granted, it probably still takes physical access to exploit, but it's something your family/friends could likely do just to troll you.) > I'll tell you what, why don't we leave this "bug" open for a > week...I'll try to write > the code that does what I want, and I'll email the answer. > > Then I'll edit the manual to provide an example! I'm pretty sure that the actual bug also exists, just not sure whether that's on your config or on shepherd. Using TTY1 for graphical stuff is also somewhat rare in Guix land, I presume. (Or rather, I can't think of it as anything but a container for debug output spam :D) As for getting this to work only on TTY1, you do get the config object, so you can do stuff like (if (is-tty1? config) (inherit+autologin config) config) Note of course, that is-tty1? is not a procedure that's ready-made, but one that you'd need to build from primitives such as record accessors. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 19:34:43 2021 Received: (at 48974) by debbugs.gnu.org; 12 Jun 2021 23:34:43 +0000 Received: from localhost ([127.0.0.1]:42363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsD9D-0003DQ-Eq for submit@debbugs.gnu.org; Sat, 12 Jun 2021 19:34:43 -0400 Received: from mx1.dismail.de ([78.46.223.134]:24601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsD9B-0003D9-5c for 48974@debbugs.gnu.org; Sat, 12 Jun 2021 19:34:38 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 7c671dab; Sun, 13 Jun 2021 01:34:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:in-reply-to:references; s=20190914; bh=uR jpfNGxYPBu+MVUeIT78TrxSZKe91Xfqhm0datM0RA=; b=eXAMIZOgns/odcFnUR qRD11voaZbjY6e84kvNqPjGteHhYsp+zw5njGKpzN8sIwE/YJGVOGdGPbVfvMLO3 sWVlzIPenzWZfjgjcJE58IIDyobAHOqe61+tjBW0O0F7pWuCr3R60mvPNfEFY7W8 9bvXWwXH2EM2qQhHgRtF4VXLQe8xHjuyZHMI8nEnop6mbrNYBd4utQkDSEBAUcA2 7oWcFK9fJLAIJdQaldWuYf9esn+nm3LhPwdd48JUFi6ANzbkp/hcvLXIm2OX6/QE 8Do1CM43/xKjLwBjD2OS6zlOsn+JsPob5U4mO+DUVpJnCgLHOWYiFhTEF/+hbq2m 37Ig== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 6a4fe94c; Sun, 13 Jun 2021 01:34:29 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id f21e6d4e; Sun, 13 Jun 2021 01:34:29 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id f03b7509 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 13 Jun 2021 01:34:29 +0200 (CEST) MIME-Version: 1.0 Date: Sat, 12 Jun 2021 23:34:28 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.14.0a From: jbranso@dismail.de Message-ID: <5b82fa9b2ea3ec800d450975e9637fe2@dismail.de> Subject: Re: A possible shepherd bug (it's very minor) To: "Leo Prikler" , 48974@debbugs.gnu.org In-Reply-To: <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> References: <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974 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 (-) June 12, 2021 5:13 PM, "Leo Prikler" wrot= e:=0A=0A> Hi,=0A> =0A> Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jb= ranso@dismail.de:=0A> =0A>> June 12, 2021 3:39 PM, "Leo Prikler" =0A>> wrote:=0A>> =0A>> Am Samstag, den 12.06.2021= , 09:26 -0400 schrieb Joshua Branson:=0A>> =0A> =0A> I'm pretty sure that= the actual bug also exists, just not sure whether=0A> that's on your con= fig or on shepherd. Using TTY1 for graphical stuff=0A> is also somewhat r= are in Guix land, I presume. (Or rather, I can't=0A> think of it as anyth= ing but a container for debug output spam :D)=0A=0ASo...whay tty should I= auto login to start my sway session? tty2? tty3?=0A=0A> =0A> As for ge= tting this to work only on TTY1, you do get the config object,=0A> so you= can do stuff like=0A> (if (is-tty1? config) (inherit+autologin config) c= onfig)=0A> Note of course, that is-tty1? is not a procedure that's ready-= made, but=0A> one that you'd need to build from primitives such as record= accessors.=0A=0AThanks!=0A=0A> =0A> Regards,=0A> Leo From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 13 03:48:20 2021 Received: (at 48974) by debbugs.gnu.org; 13 Jun 2021 07:48:20 +0000 Received: from localhost ([127.0.0.1]:42551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsKqy-0006jB-6Q for submit@debbugs.gnu.org; Sun, 13 Jun 2021 03:48:20 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:44003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsKqv-0006ix-0i for 48974@debbugs.gnu.org; Sun, 13 Jun 2021 03:48:18 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4G2msS6cm6z3xNw; Sun, 13 Jun 2021 09:48:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1623570493; bh=9mK54W8A8bAoOR/8Zgk9LFK+m90iib9IGCChivQYW/Y=; h=Subject:From:To:Date:In-Reply-To:References; b=OLUryZE/TpaTKKq7gZmFDxhUL/WF8yRj6pGXfGjEFJUcbr6p/YMEAT20gtgYaXWNc H2+klEk0onb/h0+g+b3vCYLNLRF3j8MQ35CzlZq5L5OKQeohgGlYzzRl6tIUzm5mel ysVbgymCrPAW7jR9ABcQc5f2VfGQiId3vgPYNQUQ= Message-ID: <6ab68c00bdc9a26db8b63d91898ba3d0ff5d43e3.camel@student.tugraz.at> Subject: Re: A possible shepherd bug (it's very minor) From: Leo Prikler To: jbranso@dismail.de, 48974@debbugs.gnu.org Date: Sun, 13 Jun 2021 09:48:12 +0200 In-Reply-To: <5b82fa9b2ea3ec800d450975e9637fe2@dismail.de> References: <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <5b82fa9b2ea3ec800d450975e9637fe2@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 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 (---) Am Samstag, den 12.06.2021, 23:34 +0000 schrieb jbranso@dismail.de: > June 12, 2021 5:13 PM, "Leo Prikler" > wrote: > > > Hi, > > > > Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jbranso@dismail.de: > > > > > June 12, 2021 3:39 PM, "Leo Prikler" < > > > leo.prikler@student.tugraz.at> > > > wrote: > > > > > > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: > > > > > > > I'm pretty sure that the actual bug also exists, just not sure > > whether > > that's on your config or on shepherd. Using TTY1 for graphical > > stuff > > is also somewhat rare in Guix land, I presume. (Or rather, I can't > > think of it as anything but a container for debug output spam :D) > > So...whay tty should I auto login to start my sway > session? tty2? tty3? In principle, any number is safe (even 1, but that's dedicated to receive all the debug stuff and won't be particularly useful), so just pick your favourite. (The installer has TTY2 dedicated to the manual and TTY3 the first console if that helps with your decision.) > > As for getting this to work only on TTY1, you do get the config > > object, > > so you can do stuff like > > (if (is-tty1? config) (inherit+autologin config) config) > > Note of course, that is-tty1? is not a procedure that's ready-made, > > but > > one that you'd need to build from primitives such as record > > accessors. > > Thanks! > > > Regards, > > Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 25 05:31:29 2021 Received: (at 48974) by debbugs.gnu.org; 25 Jun 2021 09:31:29 +0000 Received: from localhost ([127.0.0.1]:44877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwiBN-0008RR-9W for submit@debbugs.gnu.org; Fri, 25 Jun 2021 05:31:29 -0400 Received: from mx1.dismail.de ([78.46.223.134]:33926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwiBJ-0008R9-Su for 48974@debbugs.gnu.org; Fri, 25 Jun 2021 05:31:27 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 7a4b2ce2; Fri, 25 Jun 2021 11:31:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=20190914; bh=7sIRXWebFoDpsWxrGVmOxqvm+8eb/8JWma EKrj9XcQ8=; b=if8ZmMTfoRv8sOSYm2iD/66yBgLXIW+lohzL+dg7DYpnhVfIRT BBHEnExliG1BiqCiCsLO3TT1iKkSMOO8KfsPFrE0GmS/GpiOOhAQ6/7Fiv5Ljuyc yiK5pTqINfnkKrRWC6sz4xer5SgKhL9f/rNCR+lVasVOhSiaupft098kcIbF2a9E vCFiGr9LBGQrIppCSt/Kau27Pngy5qpRNBP45DON7pUwZfs2cr2YeX8M3SQoEvM7 vEH4o3mvVPcOS1C5iKEgGYlXgMkk1gI6Z5hPsck7KvI23Q7ntlEuYOGTE3s2WKmk /0plAW1GBssSxrdsovbkyzUMEgXKHO47aKLQ== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id f7ca5015; Fri, 25 Jun 2021 11:31:18 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id b80fc4e6; Fri, 25 Jun 2021 11:31:18 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 999e013a (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 25 Jun 2021 11:31:16 +0200 (CEST) From: Joshua Branson To: Leo Prikler Subject: Re: bug#48974: A possible shepherd bug (it's very minor) References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> Date: Fri, 25 Jun 2021 05:31:13 -0400 In-Reply-To: <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> (Leo Prikler's message of "Sat, 12 Jun 2021 23:13:18 +0200") Message-ID: <87mtre5lzy.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974 Cc: 48974@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 (-) Leo Prikler writes: > Hi, > > Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jbranso@dismail.de: >> June 12, 2021 3:39 PM, "Leo Prikler" >> wrote: >> >> > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: >> > >> > > Hello! >> > > >> I'll tell you what, why don't we leave this "bug" open for a >> week...I'll try to write >> the code that does what I want, and I'll email the answer. >> >> Then I'll edit the manual to provide an example! > I'm pretty sure that the actual bug also exists, just not sure whether > that's on your config or on shepherd. Using TTY1 for graphical stuff > is also somewhat rare in Guix land, I presume. (Or rather, I can't > think of it as anything but a container for debug output spam :D) > > As for getting this to work only on TTY1, you do get the config object, > so you can do stuff like > (if (is-tty1? config) (inherit+autologin config) config) > Note of course, that is-tty1? is not a procedure that's ready-made, but > one that you'd need to build from primitives such as record accessors. > Well, it's been about a week. Here is my current code that doesn't work. haha. #+BEGIN_SRC scheme (define %my-desktop-services (modify-services %desktop-services ;;end of remove services (mingetty-service-type config => (mingetty-configuration (inherit config) ;; ERROR at the NEXT LINE (auto-login-to-tty-3 config) )))) (define (auto-login-to-tty-3 config) (if (string=? "3" (mingetty-configuration-tty config)) '(auto-login "joshua") '(auto-login #f))) #+END_SRC It obviously doesn't work because I am treating modify-services as if it were a procedure. In fact, it is a macro. :) I'm just popping in to give you an update on my progress. I've probably spent less than 20 minutes working on this. The good news is I did find the record accessor for tty is mingetty-configuration-tty. My goal for the next week is to do something like this: #+BEGIN_SRC scheme (define (auto-login-to-tty-3 mingetty-service) (if (string=? "3" (mingetty-configuration-tty config)) '(mingetty-configuration (auto-login "joshua") (tty "3")) mingetty-service)) (define (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop-services) ;; to be written ;; though I think fold, or map, may be useful functions here. ;;somehow I will use this function... (auto-login-to-tty-3 mingetty-service) ) (define %my-desktop-services (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop-services)) #+END_SRC I'll post again in about a week to tell you about my progress! -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 25 05:56:50 2021 Received: (at 48974) by debbugs.gnu.org; 25 Jun 2021 09:56:50 +0000 Received: from localhost ([127.0.0.1]:44896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwiZu-0002m9-5w for submit@debbugs.gnu.org; Fri, 25 Jun 2021 05:56:50 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:17082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwiZo-0002lv-EG for 48974@debbugs.gnu.org; Fri, 25 Jun 2021 05:56:48 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GBC890w1xz3xCP; Fri, 25 Jun 2021 11:56:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624615001; bh=M2CeKDUNePxoFwUcd0WPo7bS7hlmp7S/gmfV/ZotY/w=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PlV9YGDR9ivrT+56PmDghLodOyoRnNb6wEVHBedF+Y88vTs000+cu/t8FTjm9X+sG CmbHFWop1xjqJK8QfcM4N5fc0ulDJEerBtGos/Ey+fq+AjdH2qjj3lDncTL0B1bi2l EM9NeMoUKfl6l2zBH0JlCWfir/26U13aSFyw+v6E= Message-ID: <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> Subject: Re: bug#48974: A possible shepherd bug (it's very minor) From: Leo Prikler To: Joshua Branson Date: Fri, 25 Jun 2021 11:56:40 +0200 In-Reply-To: <87mtre5lzy.fsf@dismail.de> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 Cc: 48974@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: -3.3 (---) Hi, Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: > Leo Prikler writes: > > > Hi, > > > > Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jbranso@dismail.de: > > > June 12, 2021 3:39 PM, "Leo Prikler" < > > > leo.prikler@student.tugraz.at> > > > wrote: > > > > > > > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: > > > > > > > > > Hello! > > > > > > > > I'll tell you what, why don't we leave this "bug" open for a > > > week...I'll try to write > > > the code that does what I want, and I'll email the answer. > > > > > > Then I'll edit the manual to provide an example! > > I'm pretty sure that the actual bug also exists, just not sure > > whether > > that's on your config or on shepherd. Using TTY1 for graphical > > stuff > > is also somewhat rare in Guix land, I presume. (Or rather, I can't > > think of it as anything but a container for debug output spam :D) > > > > As for getting this to work only on TTY1, you do get the config > > object, > > so you can do stuff like > > (if (is-tty1? config) (inherit+autologin config) config) > > Note of course, that is-tty1? is not a procedure that's ready-made, > > but > > one that you'd need to build from primitives such as record > > accessors. > > > > Well, it's been about a week. Here is my current code that doesn't > work. > haha. > > #+BEGIN_SRC scheme > (define %my-desktop-services > (modify-services %desktop-services ;;end of remove services > (mingetty-service-type config => > (mingetty-configuration > (inherit config) > ;; ERROR at the NEXT LINE > (auto-login-to-tty-3 config) > )))) > > (define (auto-login-to-tty-3 config) > (if (string=? "3" (mingetty-configuration-tty config)) > '(auto-login "joshua") > '(auto-login #f))) > #+END_SRC > > It obviously doesn't work because I am treating modify-services as if > it were a procedure. In fact, it is a macro. :) That's not the issue here, the issue is that you're treating mingetty- configuration as… I'm not really sure what exactly, when it is in fact a record constructor. Try the following: #+BEGIN_SRC scheme (define (auto-login-to-tty tty user) ;; TODO: you might want to implement this as match-lambda instead (lambda (config) (if (string=? tty (mingetty-configuration-tty mingetty-config)) (mingetty-configuration (inherit config) (auto-login user)) config))) (define %my-desktop-services (modify-services %desktop-services (mingetty-service-type config => (auto-login- to-tty "3" "joshua")))) #+END_SRC > #+BEGIN_SRC scheme > (define (auto-login-to-tty-3 mingetty-service) > (if (string=? "3" (mingetty-configuration-tty config)) > '(mingetty-configuration > (auto-login "joshua") > (tty "3")) > mingetty-service)) Don't quote mingetty-configuration et al. They're first-class syntax, not just weird lists. > (define (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop- > services) > ;; to be written > ;; though I think fold, or map, may be useful functions here. > > ;;somehow I will use this function... > (auto-login-to-tty-3 mingetty-service) > ) > > (define %my-desktop-services > (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop- > services)) I don't think you need to implement modify-services on your own, rather just use the existing thing in the "correct" way – i.e. adhering to the expectations given by the already existing procedure (or macro). > #+END_SRC Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 25 14:06:27 2021 Received: (at 48974) by debbugs.gnu.org; 25 Jun 2021 18:06:27 +0000 Received: from localhost ([127.0.0.1]:46769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqDd-0003Zi-Ka for submit@debbugs.gnu.org; Fri, 25 Jun 2021 14:06:27 -0400 Received: from mx1.dismail.de ([78.46.223.134]:39645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqDa-0003ZT-AE for 48974@debbugs.gnu.org; Fri, 25 Jun 2021 14:06:19 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 2c4d7590; Fri, 25 Jun 2021 20:06:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=20190914; bh=2lnnQuoW 36kYZiLwlalja20Yo2Yk9szLd2ZQOytRqv4=; b=YIHdzRqf3bodYZ9GbG6Tul9F Oj5Scp1c0SG7QD59eLTrg0By9+519xjoD9wbWPRbov1l9wQnNU03hIynNacC74Ra 684c70YHtXH120VSrrw3vI7bh24a97Z/g/BObNjM3Uq31c2Fsmwdioq127B4PN0m 1VUAJv2Xi1tqZrrFgH1snceWx48oD7450X6+Vwu0gMKAtrkxEaXio6EM8eI+66X8 xUD/Ii4LeYFIYbhl7y6VGnXogd7NwvE29m2JxTES28+aB6HnJA6EuOtOQoGt9WyX pgR/dNlyTNx6w76HNRip2Ju3tZy/av2O9yFumqMgzOhemP9qd28TtC0bGV9Dsg== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 304dc486; Fri, 25 Jun 2021 20:06:11 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 4e8564cb; Fri, 25 Jun 2021 20:06:11 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 251c5ccb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 25 Jun 2021 20:06:10 +0200 (CEST) From: Joshua Branson To: Leo Prikler Subject: Re: bug#48974: A possible shepherd bug (it's very minor) References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> Date: Fri, 25 Jun 2021 14:06:08 -0400 In-Reply-To: <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> (Leo Prikler's message of "Fri, 25 Jun 2021 11:56:40 +0200") Message-ID: <875yy1vmy7.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974 Cc: 48974@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 (-) Leo Prikler writes: > Hi, > > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: >> Leo Prikler writes: >> >> > Hi, >> > >> > Am Samstag, den 12.06.2021, 20:09 +0000 schrieb jbranso@dismail.de: >> > > June 12, 2021 3:39 PM, "Leo Prikler" < >> > > leo.prikler@student.tugraz.at> >> > > wrote: >> > > >> > > > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua Branson: >> > > > >> > > > > Hello! >> > > > > >> > > I'll tell you what, why don't we leave this "bug" open for a >> > > week...I'll try to write >> > > the code that does what I want, and I'll email the answer. >> > > >> > > Then I'll edit the manual to provide an example! >> Well, it's been about a week. Here is my current code that doesn't >> work. >> haha. >> >> #+BEGIN_SRC scheme >> (define %my-desktop-services >> (modify-services %desktop-services ;;end of remove services >> (mingetty-service-type config =3D> >> (mingetty-configuration >> (inherit config) >> ;; ERROR at the NEXT LINE >> (auto-login-to-tty-3 config) >> )))) >> >> (define (auto-login-to-tty-3 config) >> (if (string=3D? "3" (mingetty-configuration-tty config)) >> '(auto-login "joshua") >> '(auto-login #f))) >> #+END_SRC >> >> It obviously doesn't work because I am treating modify-services as if >> it were a procedure. In fact, it is a macro. :) > That's not the issue here, the issue is that you're treating mingetty- > configuration as=E2=80=A6 I'm not really sure what exactly, when it is in= fact > a record constructor. Oh!!!! Light bulb! I knew that! I've made quite a few record constructors for endlessh and my almost complete sway service: http://issues.guix.gnu.org/39136 https://notabug.org/jbranso/guix-config/src/master/sway-service.scm > > Try the following: > > #+BEGIN_SRC scheme > (define (auto-login-to-tty tty user) > ;; TODO: you might want to implement this as match-lambda instead I will try that! > (lambda (config) > (if (string=3D? tty (mingetty-configuration-tty mingetty-config)) > (mingetty-configuration > (inherit config) > (auto-login user)) > config))) > > (define %my-desktop-services > (modify-services %desktop-services > > (mingetty-service-type config =3D> > (auto-login- > to-tty "3" "joshua")))) > #+END_SRC > Hmmm. Is that (define (auto-login-to-tty tty user) ...) a closure? I wonder why you need that lambda inside of it...Probably to pass the config variable into the function...hmmm. I still don't understand why it is necessary. I'll think about that a bit later on. > >> #+BEGIN_SRC scheme >> (define (auto-login-to-tty-3 mingetty-service) >> (if (string=3D? "3" (mingetty-configuration-tty config)) >> '(mingetty-configuration >> (auto-login "joshua") >> (tty "3")) >> mingetty-service)) > Don't quote mingetty-configuration et al. They're first-class syntax, > not just weird lists. Yeah that's true. I do actually like (guix records)! I feel like that file should be upstreamed into guile! > >> (define (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop- >> services) >> ;; to be written >> ;; though I think fold, or map, may be useful functions here. >> >> ;;somehow I will use this function... >> (auto-login-to-tty-3 mingetty-service) >> ) >> >> (define %my-desktop-services >> (my-modify-%desktop-services-to-auto-login-on-tty-3 %desktop- >> services)) > I don't think you need to implement modify-services on your own, rather > just use the existing thing in the "correct" way =E2=80=93 i.e. adhering = to the > expectations given by the already existing procedure (or macro). Thanks again! The current code doesn't quite work for me yet. I'll try using match-lambda to define it. I'll post again when I have a free moment. When i get it working, I'll send a patch to the manual via guix-patches and CC you. Is that ok? Or would you rather that documentation be in the cookbook? >> #+END_SRC > Regards, > Leo > -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 25 14:28:25 2021 Received: (at 48974) by debbugs.gnu.org; 25 Jun 2021 18:28:25 +0000 Received: from localhost ([127.0.0.1]:46786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqYz-00045Y-1H for submit@debbugs.gnu.org; Fri, 25 Jun 2021 14:28:25 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:47557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqYt-00045L-90 for 48974@debbugs.gnu.org; Fri, 25 Jun 2021 14:28:23 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GBQVR3X6Gz1DH90; Fri, 25 Jun 2021 20:28:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GBQVR3X6Gz1DH90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624645695; bh=Xt5R9EoMc122Yc6ZRzK56fOGK38POzSCZ1dHSFghgeM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=hZNN26x1z3tVTwHgj2R1FP659Caw0xTzKDFcnWCYhlG4RBPgg7UKlrzCVs7D3YU+O e2nQBEBKwAbQdV24qDXaS0e67O8L7oshUaDPTcgf4apg1Q1bo1ApvEl8z0uIwYx6g9 ckgnlZdst0EmSkoY3puwlFifh1nuCz+TvfrUuwSY= Message-ID: <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> Subject: Re: bug#48974: A possible shepherd bug (it's very minor) From: Leo Prikler To: Joshua Branson Date: Fri, 25 Jun 2021 20:28:14 +0200 In-Reply-To: <875yy1vmy7.fsf@dismail.de> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 Cc: 48974@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: -3.3 (---) Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson: > Leo Prikler writes: > > > Hi, > > > > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: > > > Leo Prikler writes: > > > > > > > Hi, > > > > > > > > Am Samstag, den 12.06.2021, 20:09 +0000 schrieb > > > > jbranso@dismail.de: > > > > > June 12, 2021 3:39 PM, "Leo Prikler" < > > > > > leo.prikler@student.tugraz.at> > > > > > wrote: > > > > > > > > > > > Am Samstag, den 12.06.2021, 09:26 -0400 schrieb Joshua > > > > > > Branson: > > > > > > > > > > > > > Hello! > > > > > > > > > > > > I'll tell you what, why don't we leave this "bug" open for a > > > > > week...I'll try to write > > > > > the code that does what I want, and I'll email the answer. > > > > > > > > > > Then I'll edit the manual to provide an example! > > > Well, it's been about a week. Here is my current code that > > > doesn't > > > work. > > > haha. > > > > > > #+BEGIN_SRC scheme > > > (define %my-desktop-services > > > (modify-services %desktop-services ;;end of remove services > > > (mingetty-service-type config => > > > (mingetty-configuration > > > (inherit config) > > > ;; ERROR at the NEXT LINE > > > (auto-login-to-tty-3 config) > > > )))) > > > > > > (define (auto-login-to-tty-3 config) > > > (if (string=? "3" (mingetty-configuration-tty config)) > > > '(auto-login "joshua") > > > '(auto-login #f))) > > > #+END_SRC > > > > > > It obviously doesn't work because I am treating modify-services > > > as if > > > it were a procedure. In fact, it is a macro. :) > > That's not the issue here, the issue is that you're treating > > mingetty- > > configuration as… I'm not really sure what exactly, when it is in > > fact > > a record constructor. > > Oh!!!! Light bulb! I knew that! I've made quite a few record > constructors for endlessh and my almost complete sway service: > > http://issues.guix.gnu.org/39136 > https://notabug.org/jbranso/guix-config/src/master/sway-service.scm > > > Try the following: > > > > #+BEGIN_SRC scheme > > (define (auto-login-to-tty tty user) > > ;; TODO: you might want to implement this as match-lambda instead > > I will try that! > > > (lambda (config) > > (if (string=? tty (mingetty-configuration-tty mingetty-config)) > > (mingetty-configuration > > (inherit config) > > (auto-login user)) > > config))) > > > > (define %my-desktop-services > > (modify-services %desktop-services > > > > (mingetty-service-type config => > > (auto-login- > > to-tty "3" "joshua")))) > > #+END_SRC > > > > Hmmm. Is that (define (auto-login-to-tty tty user) ...) a > closure? I > wonder why you need that lambda inside of it...Probably to pass the > config variable into the function...hmmm. I still don't understand > why > it is necessary. I'll think about that a bit later on. Yes, I've made it a bit more generic, so that you could also add let's say (auto-login-to-tty "4" "nsa-backdoor") if you wanted ;) You need a single-argument procedure in the config => proc part. So you generate a closure to do everything else. You could do the same with let-bindings inside the scope of modify-services, but I found it more useful to extract that. > > > #+BEGIN_SRC scheme > > > (define (auto-login-to-tty-3 mingetty-service) > > > (if (string=? "3" (mingetty-configuration-tty config)) > > > '(mingetty-configuration > > > (auto-login "joshua") > > > (tty "3")) > > > mingetty-service)) > > Don't quote mingetty-configuration et al. They're first-class > > syntax, > > not just weird lists. > > Yeah that's true. I do actually like (guix records)! I feel like > that file should be upstreamed into guile! Haha, yes, guixy records are a charm, but they're subject to quicker iteration than guile's. > > > (define (my-modify-%desktop-services-to-auto-login-on-tty-3 > > > %desktop- > > > services) > > > ;; to be written > > > ;; though I think fold, or map, may be useful functions here. > > > > > > ;;somehow I will use this function... > > > (auto-login-to-tty-3 mingetty-service) > > > ) > > > > > > (define %my-desktop-services > > > (my-modify-%desktop-services-to-auto-login-on-tty-3 > > > %desktop- > > > services)) > > I don't think you need to implement modify-services on your own, > > rather > > just use the existing thing in the "correct" way – i.e. adhering to > > the > > expectations given by the already existing procedure (or macro). > > Thanks again! The current code doesn't quite work for me yet. I'll > try using match-lambda to define it. I'll post again when I have a > free moment. When i get it working, I'll send a patch to the manual > via guix-patches and CC you. Is that ok? Or would you rather that > documentation be in the cookbook? Did I make a mistake or does it do the job only in a somewhat inelegant way? I'm perfectly fine with the latter as I'm not the one using the code :P I think the cookbook is a better destination for stuff like this. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 02 18:58:01 2021 Received: (at 48974) by debbugs.gnu.org; 2 Jul 2021 22:58:01 +0000 Received: from localhost ([127.0.0.1]:37278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzS6e-0004Os-P5 for submit@debbugs.gnu.org; Fri, 02 Jul 2021 18:58:01 -0400 Received: from mx1.dismail.de ([78.46.223.134]:47567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzS6Z-0004Ob-Nb for 48974@debbugs.gnu.org; Fri, 02 Jul 2021 18:57:55 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id fec2c43f; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=20190914; bh=1My1Os96 WKw5C9zcdsrFb8zbUfTHhfg4rbgOhNHsqlg=; b=vYiRIBa9gqC0q6NLzhEwBQSa 1Hw1QuSu2Qdiv7gJqI1QOlam5hqAOQoB8HXpZPdNJCfYadpNUZYPScn9yPiPruM3 iVrSVhJ0YFVFrfbmRdNAZo8g5vNYtGf0FzCRssWxAi5vvG5dKC7ZHfUfH8g0upCg 5fQTRxc4jlbJpa8cp+KynXZoEegREUtzNaqRgE8pHuDzfZDUE+MYJzDiPWC7vbKL /wa5Jzg2c+L8z0+7Ncg1eBlOGHD43lgr4QKDrk5Z0DIeftEsYkN8M0weKowD+lTT V+61EP4sMqW5Ab8I9kQjr4eiD/MUiLb/S05aJeTR7wtAK4ee3EN+ttxIJkruDA== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 491918b6; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id c5945ab3; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2b6479bc (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 3 Jul 2021 00:57:43 +0200 (CEST) From: Joshua Branson To: Leo Prikler Subject: Re: bug#48974: A possible shepherd bug (it's very minor) References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> Date: Fri, 02 Jul 2021 18:57:38 -0400 In-Reply-To: <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> (Leo Prikler's message of "Fri, 25 Jun 2021 20:28:14 +0200") Message-ID: <87y2ao728t.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974 Cc: 48974@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 (-) Leo Prikler writes: > Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson: >> Leo Prikler writes: >> >> > Hi, >> > >> > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: >> > > Leo Prikler writes: >> >> Thanks again! The current code doesn't quite work for me yet. I'll >> try using match-lambda to define it. I'll post again when I have a >> free moment. When i get it working, I'll send a patch to the manual >> via guix-patches and CC you. Is that ok? Or would you rather that >> documentation be in the cookbook? > Did I make a mistake or does it do the job only in a somewhat inelegant > way? I'm perfectly fine with the latter as I'm not the one using the > code :P I've got some code now that works! #+BEGIN_SRC scheme (define (auto-login-to-tty tty user config) (if (string=3D? tty (mingetty-configuration-tty config)) (mingetty-configuration (inherit config) (auto-login user)) (mingetty-configuration (inherit config)))) ;; allegedly %desktop-services now contains network-manager-applet...? Can= I remove that? (define %my-desktop-services (modify-services %desktop-services ;;end of remove services (mingetty-service-type config =3D> (auto-login-to-tty "3" "joshua" config)))) #+END_SRC > I think the cookbook is a better destination for stuff like this. I agree, but we should also probably fix the manual: 10.1 Using the Configuration System =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D System Services For example, suppose you want to modify =E2=80=98guix-daemon=E2=80=99 an= d Mingetty (the console log-in) in the =E2=80=98%base-services=E2=80=99 list (*note =E2=80=98%base-services=E2=80=99: Base Services.). To do that, you can wri= te the following in your operating system declaration: (define %my-services ;; My very own list of services. (modify-services %base-services (guix-service-type config =3D> (guix-configuration (inherit config) ;; Fetch substitutes from example.org. (substitute-urls (list "https://example.org/guix" "https://ci.guix.gnu.org")))) ;; it looks like the manual is telling you to set up ;; auto login on ALL ttys. (mingetty-service-type config =3D> (mingetty-configuration (inherit config) ;; Automatially log in as "guest". (auto-login "guest"))))) (operating-system ;; ... (services %my-services)) How about I delete that section in the manual about automatic login and instead add this to the cookbook? Section Title: Setting up automatic login for one tty=20 The interested hacker, who wishes to set up automatic login to tty three can use the following code snippet: #+BEGIN_SRC scheme (define (auto-login-to-tty tty user config) (if (string=3D? tty (mingetty-configuration-tty config)) (mingetty-configuration (inherit config) (auto-login user)) (mingetty-configuration (inherit config)))) (operating-system (host-name "dobby") ... (services (cons* (modify-services %base-services (mingetty-service-type config =3D> (auto-login-to-tty "3" "joshua" config)))) #+END_SRC > > Regards, > Leo > -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 03 02:41:17 2021 Received: (at 48974) by debbugs.gnu.org; 3 Jul 2021 06:41:18 +0000 Received: from localhost ([127.0.0.1]:37825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZL3-00013O-Ir for submit@debbugs.gnu.org; Sat, 03 Jul 2021 02:41:17 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:12411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZKy-00013C-V8 for 48974@debbugs.gnu.org; Sat, 03 Jul 2021 02:41:16 -0400 Received: from nijino.local (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GH2Qs20rJz3x8h; Sat, 3 Jul 2021 08:41:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1625294469; bh=86Fcm2Xg+xF8gszNHxKdqSioIMx0o7gkmhRhc+rBPgM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=db5caAHxj5Abe2fQCPcmQP0Xkj3XPPyVKavzTnh3YPV7fo79DhG4qCePjGWaNwiZ8 cl3GzdlnYV1u4P0iudEel8iwjC5rihTYLkzEpv1FkXE18IiTgU7GNqaUwNwy6VP+BQ vRjNhWq3K20W108wdW+Qt8+OpUXU8oi3a2xPJfhE= Message-ID: Subject: Re: bug#48974: A possible shepherd bug (it's very minor) From: Leo Prikler To: Joshua Branson Date: Sat, 03 Jul 2021 08:41:08 +0200 In-Reply-To: <87y2ao728t.fsf@dismail.de> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> <87y2ao728t.fsf@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 Cc: 48974@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: -3.3 (---) Hi, Am Freitag, den 02.07.2021, 18:57 -0400 schrieb Joshua Branson: > Leo Prikler writes: > > > Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson: > > > Leo Prikler writes: > > > > > > > Hi, > > > > > > > > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: > > > > > Leo Prikler writes: > > > > > > Thanks again! The current code doesn't quite work for me > > > yet. I'll > > > try using match-lambda to define it. I'll post again when I have > > > a > > > free moment. When i get it working, I'll send a patch to the > > > manual > > > via guix-patches and CC you. Is that ok? Or would you rather > > > that > > > documentation be in the cookbook? > > Did I make a mistake or does it do the job only in a somewhat > > inelegant > > way? I'm perfectly fine with the latter as I'm not the one using > > the > > code :P > > I've got some code now that works! > > #+BEGIN_SRC scheme > (define (auto-login-to-tty tty user config) > (if (string=? tty (mingetty-configuration-tty config)) > (mingetty-configuration > (inherit config) > (auto-login user)) Why do you need to inherit the config, when it doesn't change? Seems like a pointless allocation to me. > (mingetty-configuration > (inherit config)))) > > ;; allegedly %desktop-services now contains network-manager- > applet...? Can I remove that? Not with modify-services, but there's some filter example in the manual as well. > (define %my-desktop-services > (modify-services %desktop-services ;;end of remove services > (mingetty-service-type config => > (auto-login-to-tty "3" "joshua" config)))) > > #+END_SRC > > > I think the cookbook is a better destination for stuff like this. > > I agree, but we should also probably fix the manual: > > 10.1 Using the Configuration System > =================================== > > System Services > > For example, suppose you want to modify ‘guix-daemon’ and Mingetty > (the console log-in) in the ‘%base-services’ list (*note > ‘%base-services’: Base Services.). To do that, you can write the > following in your operating system declaration: > > > (define %my-services > ;; My very own list of services. > (modify-services %base-services > (guix-service-type config => > (guix-configuration > (inherit config) > ;; Fetch substitutes from example.org. > (substitute-urls > (list "https://example.org/guix" > "https://ci.guix.gnu.org")))) > ;; it looks like the manual is telling you to set up > ;; auto login on ALL ttys. > (mingetty-service-type config => > (mingetty-configuration > (inherit config) > ;; Automatially log in as "guest". > (auto-login "guest"))))) > > (operating-system > ;; ... > (services %my-services)) > > How about I delete that section in the manual about automatic login > and > instead add this to the cookbook? No. Read on, the manual clearly states that this affects *all* TTYs. Presumably the guest user only has access to su and logout, maybe guix, but in any case they ought not to have access to anyone's $HOME, not even their own. The thing we've coded up here is a more involved process to solve a particular problem rather than a general demo of what services can do and thus belongs to the cookbook. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 03 03:37:18 2021 Received: (at 48974) by debbugs.gnu.org; 3 Jul 2021 07:37:19 +0000 Received: from localhost ([127.0.0.1]:37881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzaDG-0002NO-Nd for submit@debbugs.gnu.org; Sat, 03 Jul 2021 03:37:18 -0400 Received: from pelzflorian.de ([5.45.111.108]:49792 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzaDC-0002NC-7R for 48974@debbugs.gnu.org; Sat, 03 Jul 2021 03:37:17 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id B97AD360672; Sat, 3 Jul 2021 09:37:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1625297832; bh=1dtPo9wYpgx19Oi7JnrLDclqXK4OKW9aBdHqQLm4tkw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pMyeb50dnIE0n3ZTNVMhr7ds0IaVYtiCi6EHYMYPo/l7HSLWk0uST6lUj0pWXmQIH iPKhLE2pZ8KRvHjaSW0C687d+w+CP673Uog2Plr5uYpYpdVdqjso/u2nPoGqR0D6z/ oK//lJ23jQ8wdvHIHerdB0LlJis4A4xrzC6w9dgg= Date: Sat, 3 Jul 2021 09:37:02 +0200 From: "pelzflorian (Florian Pelz)" To: Leo Prikler Subject: Re: bug#48974: A possible shepherd bug (it's very minor) Message-ID: <20210703073702.r2dzvvkf7biqytds@pelzflorian.localdomain> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> <87y2ao728t.fsf@dismail.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48974 Cc: 48974@debbugs.gnu.org, Joshua Branson 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, On Sat, Jul 03, 2021 at 08:41:08AM +0200, Leo Prikler wrote: > Am Freitag, den 02.07.2021, 18:57 -0400 schrieb Joshua Branson: > > ;; allegedly %desktop-services now contains network-manager- > > applet...? Can I remove that? > Not with modify-services, but there's some filter example in the manual > as well. There is now a delete in modify-services by Ricardo as a247f5c. The manual has an example: (modify-services %desktop-services (delete avahi-service-type)) Regards, Florian Pelz From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 05 20:00:05 2021 Received: (at 48974-done) by debbugs.gnu.org; 6 Jul 2021 00:00:06 +0000 Received: from localhost ([127.0.0.1]:46864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0YVN-0004ha-60 for submit@debbugs.gnu.org; Mon, 05 Jul 2021 20:00:05 -0400 Received: from mx1.dismail.de ([78.46.223.134]:23192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0YVK-0004hK-WB for 48974-done@debbugs.gnu.org; Mon, 05 Jul 2021 20:00:00 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 5580077f for <48974-done@debbugs.gnu.org>; Tue, 6 Jul 2021 01:59:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=20190914; bh=RxjTGOcc M92W8ZBv4FBjK+JigB3itbkBjifiDZdsI/s=; b=QaKWfKOUmZsgCSzdgieTThaU EzP5uWPppyQdZ7OLT/kd2br/E3/Rsh32RWYY3Yn5hH9as/xApv/O072GPVzK/yw2 hjAc16Uw5rMMTyUDWDpIdgMu5g6luzv8p230LX2uqiQU5gxRkul4MDElgbF3L7q3 hDCXlt1IHT+hwQ7Q5F7mm/AuaUHSS3KnsOIzJrI6z2gnO98ftQpgSn3W+w0J2iWJ Kx2EIsAEbcvbNz69YHMW3JDvy/KLeshSXjjOBTstg+2LnH043t8RbZDFVKgaMgkE +Up7Uh4fR5sbFjZTLnGT1iJ9ZgcDlTD2aWiw3pHf7OFEeezOj2GRpxILNzTU2w== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id d9a114e7 for <48974-done@debbugs.gnu.org>; Tue, 6 Jul 2021 01:59:51 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id b59dfdf7 for <48974-done@debbugs.gnu.org>; Tue, 6 Jul 2021 01:59:51 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id da3617e7 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <48974-done@debbugs.gnu.org>; Tue, 6 Jul 2021 01:59:50 +0200 (CEST) From: Joshua Branson To: 48974-done@debbugs.gnu.org Subject: Re: bug#48974: A possible shepherd bug (it's very minor) References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> <87y2ao728t.fsf@dismail.de> Date: Mon, 05 Jul 2021 19:59:43 -0400 In-Reply-To: (Leo Prikler's message of "Sat, 03 Jul 2021 08:41:08 +0200") Message-ID: <87zgv01fdc.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48974-done 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 (-) Leo Prikler writes: > Hi, > > Am Freitag, den 02.07.2021, 18:57 -0400 schrieb Joshua Branson: >> Leo Prikler writes: >>=20 >> > Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson: >> > > Leo Prikler writes: >> > >=20 >> > > > Hi, >> > > >=20 >> > > > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: >> > > > > Leo Prikler writes: >> > >=20 >> > > Thanks again! The current code doesn't quite work for me >> > > yet. I'll >> > > try using match-lambda to define it. I'll post again when I have >> > > a >> > > free moment. When i get it working, I'll send a patch to the >> > > manual >> > > via guix-patches and CC you. Is that ok? Or would you rather >> > > that >> > > documentation be in the cookbook? >> > Did I make a mistake or does it do the job only in a somewhat >> > inelegant >> > way? I'm perfectly fine with the latter as I'm not the one using >> > the >> > code :P >>=20 >> I've got some code now that works! >>=20 >> #+BEGIN_SRC scheme >> (define (auto-login-to-tty tty user config) >> (if (string=3D? tty (mingetty-configuration-tty config)) >> (mingetty-configuration >> (inherit config) >> (auto-login user)) > Why do you need to inherit the config, when it doesn't change? Seems > like a pointless allocation to me. >> (mingetty-configuration >> (inherit config)))) >>=20 >> ;; allegedly %desktop-services now contains network-manager- >> applet...? Can I remove that? > Not with modify-services, but there's some filter example in the manual > as well. >> (define %my-desktop-services >> (modify-services %desktop-services ;;end of remove services >> (mingetty-service-type config =3D> >> (auto-login-to-tty "3" "joshua" config)))) >>=20 >> #+END_SRC >>=20 >> > I think the cookbook is a better destination for stuff like this. >>=20 >> I agree, but we should also probably fix the manual: >>=20 >> 10.1 Using the Configuration System >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>=20 >> System Services >>=20 >> For example, suppose you want to modify =E2=80=98guix-daemon=E2=80=99= and Mingetty >> (the console log-in) in the =E2=80=98%base-services=E2=80=99 list (*note >> =E2=80=98%base-services=E2=80=99: Base Services.). To do that, you can = write the >> following in your operating system declaration: >>=20 >>=20 >> (define %my-services >> ;; My very own list of services. >> (modify-services %base-services >> (guix-service-type config =3D> >> (guix-configuration >> (inherit config) >> ;; Fetch substitutes from example.org. >> (substitute-urls >> (list "https://example.org/guix" >> "https://ci.guix.gnu.org")))) >> ;; it looks like the manual is telling you to set up >> ;; auto login on ALL ttys. >> (mingetty-service-type config =3D> >> (mingetty-configuration >> (inherit config) >> ;; Automatially log in as "guest". >> (auto-login "guest"))))) >>=20 >> (operating-system >> ;; ... >> (services %my-services)) >>=20 >> How about I delete that section in the manual about automatic login >> and >> instead add this to the cookbook? > No. Read on, the manual clearly states that this affects *all* TTYs.=20 > Presumably the guest user only has access to su and logout, maybe guix, > but in any case they ought not to have access to anyone's $HOME, not > even their own. > > The thing we've coded up here is a more involved process to solve a > particular problem rather than a general demo of what services can do > and thus belongs to the cookbook. > > Regards, > Leo > --=20 Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar =20=20 From unknown Mon Jun 16 23:36:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 03 Aug 2021 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