Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2011 09:53:57 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Antonio Olivares <olivares14031@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: autologin on default shell /bin/sh
Message-ID:  <alpine.BSF.2.00.1109260944370.67964@wonkity.com>
In-Reply-To: <CAJ5UdcMbWFgDPSJbP-_eR%2BoUL6wy7F2CK5sCCHSvDFP2XbiCSA@mail.gmail.com>
References:  <CAJ5UdcN7px94fjidvTkdB53Kc7KNO9939kpk%2BAmUohqc_7m%2BMA@mail.gmail.com> <4E7F4F14.7000408@infracaninophile.co.uk> <CAJ5UdcMbWFgDPSJbP-_eR%2BoUL6wy7F2CK5sCCHSvDFP2XbiCSA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Sep 2011, Antonio Olivares wrote:

> If I type my username and login, startx starts automatically, but 
> after I have logged in by typing my username and password.

That means the part that starts X is correct.

> This is an excerpt of /etc/ttys on FreeBSD 9.0 BETA 2
>
> ttyv0   "/usr/libexec/getty Pc"         xterm   on  secure
> # Virtual terminals
> ttyv1   "/usr/libexec/getty Pc"         xterm   on  secure

Don't use xterm, it won't be able to run before X has started.

"Pc" is the standard login.  The new entry in /etc/gettytab creates a 
new "Al" for autologin:

A|Al|Autologin console:\
 	:ht:np:sp#115200:al=user

The "A", "Al", and "Autologin console" are all names for that entry.

When the system starts, it will start the ttys listed in /etc/ttys:

ttyv0	"/usr/libexec/getty Pc"		cons25	on  secure
ttyv1	"/usr/libexec/getty Al"		cons25	on  secure

I leave ttyv0 alone for log messages and such, and put the autologin on 
ttyv1.

An autologin system probably won't need the rest of the ttyv entries and 
they can be commented out.



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