Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2012 12:57:41 +0300
From:      Gleb Kurtsou <gleb.kurtsou@gmail.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-hackers@FreeBSD.org
Subject:   Re: boot menu option to disable graphics mode
Message-ID:  <20120607095741.GA1361@reks>
In-Reply-To: <4FD06CD3.3080602@FreeBSD.org>
References:  <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120607095741.GA1361>