From owner-freebsd-questions@FreeBSD.ORG Mon Sep 26 15:53:58 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F193106566C for ; Mon, 26 Sep 2011 15:53:58 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4DF8FC16 for ; Mon, 26 Sep 2011 15:53:57 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id p8QFrvut068071; Mon, 26 Sep 2011 09:53:57 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id p8QFrvvt068068; Mon, 26 Sep 2011 09:53:57 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 26 Sep 2011 09:53:57 -0600 (MDT) From: Warren Block To: Antonio Olivares In-Reply-To: Message-ID: References: <4E7F4F14.7000408@infracaninophile.co.uk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 26 Sep 2011 09:53:57 -0600 (MDT) Cc: freebsd-questions@freebsd.org Subject: Re: autologin on default shell /bin/sh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 15:53:58 -0000 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.