boot menu option to disable graphics mode

Lars Engels lme at FreeBSD.org
Thu Jun 7 20:35:08 UTC 2012


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 like this idea.

rc(8) sets rc_fast=yes 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`" = "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".


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120607/018563ea/attachment.pgp


More information about the freebsd-hackers mailing list