~/.bash_profile
if shopt -q login_shell; then
[[ -f ~/.bashrc ]] && source ~/.bashrc
[[ -t 0 && $(tty) == /dev/tty1 && ! $DISPLAY ]] && exec startx
else
exit 1 # Somehow this is a non-bash or non-login shell.
fi
~/.bash_profile
if [[ ! ${DISPLAY} && ${XDG_VTNR} == 1 ]]; then
exec startx
fi
cp /etc/X11/xinit/xinitrc ~/.xinitrc vi ~/.xinitrc #!/bin/sh # /etc/X11/xinit/xinitrc # # global xinitrc file, used by all X sessions started by xinit (startx) # invoke global X session script . /etc/X11/Xsession exec x-window-manager &