autologin on default shell /bin/sh
Antonio Olivares
olivares14031 at gmail.com
Mon Sep 26 15:28:13 UTC 2011
On Sun, Sep 25, 2011 at 10:56 AM, Matthew Seaman
<m.seaman at infracaninophile.co.uk> wrote:
> On 25/09/2011 16:16, Antonio Olivares wrote:
>> 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.
>
> If the shell on your auto-login account is /bin/sh, then you should put
> your X startup in .profile -- syntax is identical to the bash example
> you showed.
>
> If the shell on your auto-login account is /bin/csh or /bin/tcsh (which
> are really exactly the same thing on FreeBSD), then you should put your
> X startup in .login In this case the syntax is different, but you can
> copy wblock's example from the forum thread you referenced.
>
> Either of those shells should work.
>
> Cheers,
>
> Matthew
>
> --
> Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
> Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
>
>
Thanks Dr Matthew, Warren & others who have made suggestions.
It works [FreeBSD 9.0 BETA 2] partially.
$ uname -a
FreeBSD e213-amd64-1.grullahighschool.org 9.0-BETA2 FreeBSD 9.0-BETA2
#0: Tue Sep 20 10:02:05 CDT 2011
root at e213-amd64-1:/usr/obj/usr/src/sys/GENERIC amd64
$
They have changed /etc/gettytab from cons25 to xterm, and even
changing it to cons25 back has no effect. If I type my username and
login, startx starts automatically, but after I have logged in by
typing my username and password.
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
ttyv2 "/usr/libexec/getty Pc" xterm on secure
ttyv3 "/usr/libexec/getty Pc" xterm on secure
ttyv4 "/usr/libexec/getty Pc" xterm on secure
ttyv5 "/usr/libexec/getty Pc" xterm on secure
ttyv6 "/usr/libexec/getty Pc" xterm on secure
Something is restricting the automatic login, but don't know how to
troubleshoot this.
Regards,
Antonio
More information about the freebsd-questions
mailing list