From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 08:56:55 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C5A310657A9 for ; Thu, 7 Jun 2012 08:56:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C748D8FC0A for ; Thu, 7 Jun 2012 08:56:54 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA17165; Thu, 07 Jun 2012 11:56:52 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ScYWS-000Cb0-A5; Thu, 07 Jun 2012 11:56:52 +0300 Message-ID: <4FD06CD3.3080602@FreeBSD.org> Date: Thu, 07 Jun 2012 11:56:51 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> In-Reply-To: <20120607084738.GT85127@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 08:56:55 -0000 on 07/06/2012 11:47 Konstantin Belousov said the following: > On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >> >> It's long been a wish of mine to have an ability to decide at boot time that a >> system should boot in "console-only" mode. That is, that no graphics/X >> applications like e.g. xdm/kdm/gdm are automatically started even when they are >> configured to do so. >> >> Here is my attempt at implementing that: >> https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d241e7855338a6ed7?format=patch >> >> All the option does at boot time is setting of 'inhibit_gui' variable for kernel >> environment. I envision that this variable could be properly and gracefully >> handled in various startup scripts and/or application startup logic. >> But to ensure that the option is always honored I've also added "ultimate >> protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. > This is too much, IMO. I understand why you may want to disable > auto-start of login manager, but preventing a user from running X at all > until she learns about kenv -u _and_ obscure code somewhere in the kernel, > is unreasonable. A user doesn't have to select the option unless he needs to. A "simple user" can just reboot without selecting the option to get back his X. A user doesn't have to learn anything about the code, just about kenv and "magic" inhibit_gui variable. IMO. -- Andriy Gapon