[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to startx at boot time



Khanh Cao Van wrote:
> I' tried change the run level in /etc/inittab to 5 but my PC did not
> boot in X at boot time . Ofcause I've install all gnome and x windows
> and could startx by hand . How should I do ?

Debian doesn't use runlevels in that manner. I removed gdm/kdm/xdm and
have these lines in ~/.bash_profile (use backtics (`) here):

        if [ `tty` = "/dev/tty1" ]; then
                startx
        fi

(You could follow that startx with a check for a few minutes of uptime and
 a "sudo halt" if you want the box to power off at logout. The uptime check
 to avoid nasty reboot loops if X fails for some reason.)

In addition, install "mingetty" and auto-login by way of /etc/inittab

        1:2345:respawn:/sbin/mingetty --autologin jim tty1
        2:23:respawn:/sbin/getty 38400 tty2

Turn the computer on, and up comes your GUI without further intervention.
Only use gdm/kdm/xdm (etc..) if there are multiple users wanting separate
accounts in the house.



Reply to: