From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 20:35:08 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 F06341065670; Thu, 7 Jun 2012 20:35:07 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1E78FC0A; Thu, 7 Jun 2012 20:35:07 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mail.0x20.net (Postfix) with ESMTP id 0A4AE6A601C; Thu, 7 Jun 2012 22:35:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.0x20.net Received: from mail.0x20.net ([217.69.76.211]) by mail.0x20.net (mail.0x20.net [217.69.76.211]) (amavisd-new, port 10024) with ESMTP id 42KslAY0uNo8; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id B47796A6006; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id q57KZ5rs099777; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id q57KZ5I7099317; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) (envelope-from lars) Date: Thu, 7 Jun 2012 22:35:05 +0200 From: Lars Engels To: Andriy Gapon Message-ID: <20120607203505.GG5592@e-new.0x20.net> References: <4FD05C16.9040905@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qCPPoBTQI/bIC4sS" Content-Disposition: inline In-Reply-To: <4FD05C16.9040905@FreeBSD.org> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p2 User-Agent: Mutt/1.5.21 (2010-09-15) 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 20:35:08 -0000 --qCPPoBTQI/bIC4sS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >=20 > It's long been a wish of mine to have an ability to decide at boot time t= hat 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 th= ey are > configured to do so. >=20 > Here is my attempt at implementing that: > https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d= 241e7855338a6ed7?format=3Dpatch >=20 > All the option does at boot time is setting of 'inhibit_gui' variable for= kernel > environment.=20 I like this idea. rc(8) sets rc_fast=3Dyes when the system boots, so it would be possible to extend the scripts that start a desktop manager can use a code like this: if [ -n "$rc_fast" -a "`kenv inhibit_gui 2> /dev/null`" =3D "1" ]; then echo "Console only mode, $name not started" exit 0 fi Then the user can still start the DM manually by issuing "service $name start". --qCPPoBTQI/bIC4sS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/REHkACgkQKc512sD3afjauACfVCcxcB4tsR6yPcV7ubHSarjD 0J4AoL3uwXXyT5l2qu3K8w/Flm5aCXxu =bwrH -----END PGP SIGNATURE----- --qCPPoBTQI/bIC4sS--