Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2011 10:16:16 -0500
From:      Antonio Olivares <olivares14031@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   autologin on default shell /bin/sh
Message-ID:  <CAJ5UdcN7px94fjidvTkdB53Kc7KNO9939kpk%2BAmUohqc_7m%2BMA@mail.gmail.com>

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

<quote>
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.

</quote>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ5UdcN7px94fjidvTkdB53Kc7KNO9939kpk%2BAmUohqc_7m%2BMA>