From owner-freebsd-questions@FreeBSD.ORG Sun Sep 25 15:16:18 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 53FBF106566B for ; Sun, 25 Sep 2011 15:16:18 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1A34E8FC14 for ; Sun, 25 Sep 2011 15:16:17 +0000 (UTC) Received: by yia13 with SMTP id 13so4744707yia.13 for ; Sun, 25 Sep 2011 08:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=wvgHuixHO7KJdM4f4G13OpSdGUVw2cAYvqZrDhTvRd8=; b=Izt1yBIGylw4y9RPttCEBcPAJY3T8wc4PkEU/Rpdz/2+24DGskKMw2/qoqUE2zUEvz YCndO+uCggn+UlGyiBRdLjJ2CjWKasbx3nup/7klLCxfNN2CGeGYdboUaEAaqtzeNzQ4 ZQXuP67el6gXlmdlHgYkCd/l3xFelLgRrasOQ= MIME-Version: 1.0 Received: by 10.42.154.135 with SMTP id q7mr6506266icw.87.1316963776928; Sun, 25 Sep 2011 08:16:16 -0700 (PDT) Received: by 10.42.177.199 with HTTP; Sun, 25 Sep 2011 08:16:16 -0700 (PDT) Date: Sun, 25 Sep 2011 10:16:16 -0500 Message-ID: From: Antonio Olivares To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 Subject: 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: Sun, 25 Sep 2011 15:16:18 -0000 Dear folks, I have several FreeBSD boxes three 8.2 amd 64 with autologin working fine but with bash shell, /usr/local/bin/bash. I have used bits & pieces from several places and thanks to kind folks like Polytropon and others(hope I don't offend anyone), I was able to login automatically and startx as well from ~/.bash_login file. FreeBSD autologin How to make some user login automatically? Add to the /etc/gettytab file the following strings: test:\ :al=test:ht:np:sp#115200: test:\ - entry name, autologin will use this username; al=test - autologin username; ht - terminal has real tabs; np - 8-bit chars; (optional) sp#115200 - line speed; Edit /etc/ttys file: ttyv0 "/usr/libexec/getty test" cons25 on secure Usual Pc changed with test. http://keyhell.org/advices.html and a .bash_login file [olivares@quadcore ~]$ cat .bash_login # if test ! -f /tmp/.X0-lock; then /usr/local/bin/startx fi that runs startx automagically. I have a 9.0 BETA 2 amd64 machine and I am using /bin/sh shell or default shell when one installs FreeBSD. I want to be able to setup autologin and automatic startx as well like I have on the other machines I tried to edit ~/.cshrc and copied W Block's example, but it did not work https://freebsd-forums.liquidneon.com/showthread.php?t=22304 How can I get it without using bash? Do I need to create a ~/.csh_login file and add the code to startx? I have tried to add to ~/.cshrc the code: if [ `/usr/bin/tty` = '/dev/ttyv0' ]; then /usr/local/bin/startx fi and it does not work. As always, thanks for any pointers to solve this problem. I will get to the machine tomorrow at work, but I want to try some options and then report back which option/options helped solve the problem. Regards, Antonio