From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 07:45:29 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 B5D8A106566B; Thu, 7 Jun 2012 07:45:29 +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 A56D78FC0A; Thu, 7 Jun 2012 07:45:28 +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 KAA16325; Thu, 07 Jun 2012 10:45:27 +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 1ScXPK-000CVe-Ny; Thu, 07 Jun 2012 10:45:26 +0300 Message-ID: <4FD05C16.9040905@FreeBSD.org> Date: Thu, 07 Jun 2012 10:45:26 +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: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: 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 07:45:29 -0000 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. What do you think? -- Andriy Gapon