Start X on login

From Gentoo Wiki
Jump to: navigation, search

This seems to be a duplicate of earlier X without Display Manager .

This guide shows how you can start X after logging in to terminal. Its lightweight alternative to display managers. When combined with Automatic_login_to_virtual_console a system can be configured to automatically boot directly into X.

X

To automatically start X, add the following to your ~/.bash_profile.

FILE ~/.bash_profile
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi

KDE

To automatically start KDE, add the following to your ~/.bash_profile.

FILE ~/.bash_profile
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx /usr/bin/startkde; fi

Now when you log in to the first terminal bash executes startx automatically.