autologin and auto run X server

gulanito

Member


Messages: 39

Hi.
I use freebsd as a desktop computer, so I want that when freebsd boots up, automatically login as user and run the X server.
What can I do that?

Thanks!
 

Xand_69

New Member


Messages: 9

gulanito said:
Hi.
I use freebsd as a desktop computer, so I want that when freebsd boots up, automatically login as user and run the X server.
What can I do that?

Thanks!
user - HouseMD
autologin to ttyv1
shell - csh

1. insert /etc/gettytab

Code:
al_HouseMD:\
        :ht:np:sp#115200:al_HouseMD:
2. edit /etc/ttys
Code:
ttyv1   "/usr/libexec/getty al_HouseMD"           cons25r on  secure
3 cd /home/HouseMD

insert .csh
Code:
if  ($tty == ttyv1) then
  startx
  logout
endif
4. shutdown -r now

5. enjoy :)
 

segfault

Active Member

Reaction score: 30
Messages: 135

THis did not work for me (FreeBSD 9.0) and rendered my system unusable.
Did I do something wrong or was this a just sabotage?
 

kpedersen

Daemon

Reaction score: 538
Messages: 1,443

I usually just create and add to /etc/rc.local

Code:
su -l myusername -c /usr/local/bin/startx &
On some installs it seems to lock up keyboard input (I think the getty / login takes input focus) so I also replace the startx with a script that sleeps for about 5 seconds and then starts X11.

Remember to add the '&' or it may prevent other services from starting.
 
Top