From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 09:57:48 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB311065676; Thu, 7 Jun 2012 09:57:48 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D448A8FC12; Thu, 7 Jun 2012 09:57:47 +0000 (UTC) Received: by laai10 with SMTP id i10so359507laa.13 for ; Thu, 07 Jun 2012 02:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=3aJy5O5aZ0iShFQQi7SPMpxj1gQ/kt1UONTZQ456354=; b=ByknHC0ifyNL1SRaqxPyaZvlR9m3YFh/wbkSR6DIrbvdSASJG6MLVUdToeGYBBuICJ hg2bVO71OkThpefgQN4zl4baCkFx1+FpYk4S2EsS+Vm4GcsnaTwVkgAT+PWEoWZpoFcG oYzYBVJ0bbtCO17GnbQCJsMBo5BJLYWZwP61zcGEeyaNXdKeJosfiAvaqu+czZSSbpvU EdawPCTOFyqcLb8HPFNv523v1sFFBKbwKnuAs3BpKLw1+rhDHBzRgkiFc/pkxJSZ0tcN oE9WcbOh43F/DCC5t++gO2TZCUuUnnzSCgMA8BQXKZXuO9JjNTJq6HmgUzpEs6ItdhAN m7FA== Received: by 10.152.135.200 with SMTP id pu8mr1780541lab.8.1339063066722; Thu, 07 Jun 2012 02:57:46 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id hi14sm3990690lab.4.2012.06.07.02.57.44 (version=SSLv3 cipher=OTHER); Thu, 07 Jun 2012 02:57:45 -0700 (PDT) Date: Thu, 7 Jun 2012 12:57:41 +0300 From: Gleb Kurtsou To: Andriy Gapon Message-ID: <20120607095741.GA1361@reks> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FD06CD3.3080602@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , 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 09:57:48 -0000 On (07/06/2012 11:56), Andriy Gapon wrote: > 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. What do you think about adding generic support for overriding *_enable options in rc.conf? I'd like to be able to disable services at boot prompt, e.g. # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf Similarly rc.pf_enable="no" Then introduce x_enable knob (=yes by default) to disable login managers. User will be able to override this setting with # service xdm forcestart Thanks, Gleb.