From owner-freebsd-x11@freebsd.org Thu Sep 1 18:50:46 2016 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6A8EBCC1A6 for ; Thu, 1 Sep 2016 18:50:46 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1F8E6B for ; Thu, 1 Sep 2016 18:50:46 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 9002A1017; Thu, 1 Sep 2016 18:50:39 +0000 (UTC) Subject: Re: Fwd: Console only boot option References: <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com> Cc: Colin Percival To: Anthony Jenkins , freebsd-x11@freebsd.org From: Allan Jude Message-ID: <52049264-cc66-b244-c6eb-fa99f2a236fd@freebsd.org> Date: Thu, 1 Sep 2016 14:50:36 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dt0rfXeadjuLbHTED10cmoiQAGkuv0xnB" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 18:50:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Dt0rfXeadjuLbHTED10cmoiQAGkuv0xnB Content-Type: multipart/mixed; boundary="C89kDjlq8MDVEqonlcPMFkINej2lSXP9C" From: Allan Jude To: Anthony Jenkins , freebsd-x11@freebsd.org Cc: Colin Percival Message-ID: <52049264-cc66-b244-c6eb-fa99f2a236fd@freebsd.org> Subject: Re: Fwd: Console only boot option References: <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com> In-Reply-To: <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com> --C89kDjlq8MDVEqonlcPMFkINej2lSXP9C Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-09-01 14:46, Colin Percival wrote: >=20 >=20 >=20 > -------- Forwarded Message -------- > Subject: Console only boot option > Date: Thu, 1 Sep 2016 11:22:23 -0400 > From: Anthony Jenkins via freebsd-x11 > Reply-To: Anthony Jenkins > To: freebsd-x11@freebsd.org >=20 > I have a patch against base that adds an option "Console" to the Boot > Options sub-menu to prevent a GUI desktop port from being started: >=20 > 1. Back to Main Menu [Backspace] > 2. Load System Defaults >=20 > Boot Options: > 3. Safe Mode... Off > 4. Single User. Off > 5. Verbose..... off > 6. Console..... off >=20 >=20 > When set to "On", a kernel environment variable "boot_console" is set t= o > "YES"; else "boot_console" is unset. A GUI desktop startup script in > ${LOCALBASE}/etc/rc.d/ should read this variable and, if set, should >=20 > * Ignore a command to start the GUI > * Unset "boot_console" (this allows one to manually start the GUI > after initial boot). >=20 > I'm open to suggestions about semantics to make this functionality > clearer (e.g. "Console..... On" is not intuitive). >=20 > The problem I have is in the GUI startup scripts, which must be modifie= d > to make this work. What I *want* is to make a *simple* modification to= > all GUI startup scripts (e.g. ${LOCALBASE}/etc/rc.d/kdm4) such that > /etc/rc knows what scripts are "GUI startup scripts" and, if > $boot_console is set, performs the above 2 actions. Right now, for me > to make this patch work, I have to add code to my kdm4 startup script t= o > do this, which would be ugly to add to every GUI startup script in port= s. >=20 > Maybe one of the following would be simple/general enough to work: >=20 > * Have each GUI startup script declare a variable, e.g. "gui_startup"= , > which /etc/rc reads to determine whether to disable its startup if > $boot_console is set. > * Have an rc.conf(5) variable "gui_startup_scripts" which holds a lis= t > of startup scripts to not execute if $boot_console is set. > * Have each GUI startup script REQUIRE (i.e. rcorder(8)) > "gui_start_check" which fails if $boot_console is set. >=20 > GUI desktop port maintainers would have to modify their respective port= s > to implement option 1 & 3; the user would have to add her desktop to > /etc/rc.conf for option 2. I'd implement the guts. >=20 > Other suggestions welcome. >=20 > https://github.com/ScoobiFreeBSD/freebsd/commit/2376fc13627db10a65bcab9= d9091cbd8ff049e87 > https://github.com/ScoobiFreeBSD/freebsd/commit/2376fc13627db10a65bcab9= d9091cbd8ff049e87.patch >=20 I think I prefer the 3rd option, having a dependant service that is controlled by the variable from the boot loader. This minimizes the changes to each port to just a single word added to the metadata. If the ports people want to decide which method they prefer, I would be happy to shepherd the changes to the boot loader / menu itself. --=20 Allan Jude --C89kDjlq8MDVEqonlcPMFkINej2lSXP9C-- --Dt0rfXeadjuLbHTED10cmoiQAGkuv0xnB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJXyHh/AAoJEBmVNT4SmAt+lXcQAKXhFMt23Xd1PuG6WpM2rfIQ fJQ4o5AqdQul8jZxt5CQ5MT52xZjj13obuqoncbRR6jIjEqIk3qYjWATBx4AIW9H /aF5QRSQg5XVNXIjb2enUYSRkW/asTLqZV2vDNdhTu1KqhHuiLIzjTq7qf+tSV0m KVpLw68Ilym4BaWz9Du2E592l1G8OtNfn4rR1TDQYBN9Y7mZ4ueZC/p7eM1kjblW 0GNsKWn0DnRqKTOXpqfiPjAdkb9vPCaIJq9xb/iNhy2Wb7n6O4Ecs0Kgbo1EV2XG cmNXfwIC/PzJ5lsZ7BfgigqXO8yc9gboq/Xhu0FVACfl4I2Evnbw3UXwWZ8VKuIP 7+cztETppdYsJp/JqRvCeM1lbXVs+llbrDVpw4c6JXaEs9h6hainlQGPmKtpERRG flEDGSaGwU1stMj5C0L6k9/I4BRGOlLnE6uX0jo+av3zuzr99AxfoYwz6vEOxzgl BKjqW7Ap2X/3VQbQr+KqYue0earpVXrlVD4TY8Q/IITfLnC4rdB3jAsbQycKOfOe AS+LB3LLeTFAzL3z9IbIHv7Fz/YZWzwWuETe+hiBCDjCXu/euc3l2GYjw4AjOKgv jd0MXPTOLzx4eeTCF4F7GE8Dr7V+/qU0Xv69x0ExFan57tny/YN/B74f6/hoyDsR 09SCyvEI0uUUOBgOpBUG =Gmk3 -----END PGP SIGNATURE----- --Dt0rfXeadjuLbHTED10cmoiQAGkuv0xnB--