Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2016 14:50:36 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        Anthony Jenkins <Scoobi_doo@yahoo.com>, freebsd-x11@freebsd.org
Cc:        Colin Percival <cperciva@tarsnap.com>
Subject:   Re: Fwd: Console only boot option
Message-ID:  <52049264-cc66-b244-c6eb-fa99f2a236fd@freebsd.org>
In-Reply-To: <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com>
References:  <e48d3b7a-f2ac-3d12-56a4-b907a36ac099@yahoo.com> <01000156e712dd33-54873391-f056-4e0a-bf9e-b23a2053a412-000000@email.amazonses.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Dt0rfXeadjuLbHTED10cmoiQAGkuv0xnB
Content-Type: multipart/mixed; boundary="C89kDjlq8MDVEqonlcPMFkINej2lSXP9C"
From: Allan Jude <allanjude@freebsd.org>
To: Anthony Jenkins <Scoobi_doo@yahoo.com>, freebsd-x11@freebsd.org
Cc: Colin Percival <cperciva@tarsnap.com>
Message-ID: <52049264-cc66-b244-c6eb-fa99f2a236fd@freebsd.org>
Subject: Re: Fwd: Console only boot option
References: <e48d3b7a-f2ac-3d12-56a4-b907a36ac099@yahoo.com>
 <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 <freebsd-x11@freebsd.org>
> Reply-To: Anthony Jenkins <Scoobi_doo@yahoo.com>
> To: freebsd-x11@freebsd.org <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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52049264-cc66-b244-c6eb-fa99f2a236fd>