Tuesday, March 15, 2011

Auto startup of process / program on linux

auto startup of a process / program (including slackware)

http://www.linuxquestions.org/questions/linux-software-2/autologin-without-gui-374338/

seems the reason it wouldn't work is because i needed to set the NO_PASSWORD_CONSOLE option in /etc/login.defs...

everything is working fine now... i set 3 ttys, tty3 being the one that is autologin...

this is what my working setup looks like now:

/etc/login.defs:
Code:

NO_PASSWORD_CONSOLE tty3

/etc/inittab:
Code:

c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:235:respawn:/sbin/agetty -n -l /usr/sbin/autologin 38400 tty3 linux

~/.bash_profile:
Code:

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty3 ]; then
startx
fi

/etc/securetty (i commented all ttys except tty1):
Code:

tty1

in the inittab i removed the "1" from the c3 line as i don't want the auto login tty3 to be up when i go to runlevel 1 (single user mode)...

No comments:

Post a Comment