From owner-freebsd-x11@freebsd.org Thu Sep 1 15:25:24 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 DC050BCB822 for ; Thu, 1 Sep 2016 15:25:24 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm34-vm3.bullet.mail.bf1.yahoo.com (nm34-vm3.bullet.mail.bf1.yahoo.com [72.30.239.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9541675F for ; Thu, 1 Sep 2016 15:25:24 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1472743344; bh=HwCLeQU1/DQrhPhIfJe+FNmsH9aHG6BjdcAeYRWMp9w=; h=To:From:Subject:Date:From:Subject; b=WUu0Libba3YTCrlG0av+mtMuhdFiBHyIsjibO2U7OKpZ79Ja1/mIUtOLVks7qC3L9V0L/Ju/Gb2S97CoHlaO3sIVZEjUUK/AXe3cSsJz+mTcmLaZALZ6xnkhkG9xxguWnVbQrHYkzlygr/axNhfgmaJGaDQkYKcmxdSYMQ9etKBRwvHXYX9S6OfIdaxEIdaSlyregbNrwVbYyKx0UOmyDwFMDpxvF2GXkwSN8A6iHf+CD+Faqy7GpdITB6b0Ym6YUATt/w88+7wjBvhdOXmuHjGYa0y9iznO+ikXEulW1pEWRXkZBjDUT8Liw+QKjZQZt9Jlg/74nqJQGT2LBlZjVw== Received: from [98.139.215.140] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 01 Sep 2016 15:22:24 -0000 Received: from [98.139.211.197] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 01 Sep 2016 15:22:24 -0000 Received: from [127.0.0.1] by smtp206.mail.bf1.yahoo.com with NNFMP; 01 Sep 2016 15:22:24 -0000 X-Yahoo-Newman-Id: 729122.19587.bm@smtp206.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yiHqyDAVM1lq5GrQ9IECJhX2cTbaKGo8eR_c.63BIEcTAjC BEVC59a2srpsuZhI5W98_PPsGFnyU0WQINpQJaXgquBD9zG9eCVSKJzRVrM7 v7mdsh82ImrwnzZInf_qfctJgvCSpzhGwNP5FV6dBgUEW0RSx8qmo1xbnQs8 mQCo_vdSYJLW4P1z_l.8nRULj1fEGkNuCYenoHAvnOYvZD8N4z_CNJbNBIkN 9ZMJpZMUPfc.qxPp1KLILumrE3NzX.A_k3WC3_ALSsJAszUNen_mOYWbzllt 5d7CKPxBsRwDGgnb7UcHzlkFp_RJYhrDyH3rJAE.XFpQdTwQvdLLx96DsFk2 w.C9xMXLu76kxPbcHsrzf_wHIzR.FJDseHD5dmgpkMdUNaD3PCDC_jrCUqlf QsdjAy5BeMMn3WpeCAQEYNtHUuS4Sc4f_FyPRctsylUUliTVt4u15lojAJAb qUcU4PFdY2uO0WYwABye0NlurPua5rdIhpSsH4aLZ4z16QEJjY7CUtOY1RSg Oa0ko7f.Ym4nlkZZreyQ7miOllPFZoACXF0Z0vLHpbP0Pn8nXWzvnAvCeFq. K_6KGV1vVRYcHt3uwrrS.HjppKr44sKEWQ4ueY.E5u7KG8VFqcYxVHSb8Og5 FiosT3xFnGUfKGLG2_UxVqXIQmjXpDQ-- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- To: "freebsd-x11@freebsd.org" From: Anthony Jenkins Subject: Console only boot option Message-ID: Date: Thu, 1 Sep 2016 11:22:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 15:25:25 -0000 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: 1. Back to Main Menu [Backspace] 2. Load System Defaults Boot Options: 3. Safe Mode... Off 4. Single User. Off 5. Verbose..... off 6. Console..... off When set to "On", a kernel environment variable "boot_console" is set to "YES"; else "boot_console" is unset. A GUI desktop startup script in ${LOCALBASE}/etc/rc.d/ should read this variable and, if set, should * Ignore a command to start the GUI * Unset "boot_console" (this allows one to manually start the GUI after initial boot). I'm open to suggestions about semantics to make this functionality clearer (e.g. "Console..... On" is not intuitive). The problem I have is in the GUI startup scripts, which must be modified 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 to do this, which would be ugly to add to every GUI startup script in ports.= Maybe one of the following would be simple/general enough to work: * 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 list 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. GUI desktop port maintainers would have to modify their respective ports 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. Other suggestions welcome. https://github.com/ScoobiFreeBSD/freebsd/commit/2376fc13627db10a65bcab9d9= 091cbd8ff049e87 https://github.com/ScoobiFreeBSD/freebsd/commit/2376fc13627db10a65bcab9d9= 091cbd8ff049e87.patch --=20 Anthony Jenkins