Auto start X

This page is in help of those who need help setting and configuring X.Org auto start on login.

Things you should know before getting started
The method that's going to be used places file in /etc/profile.d/ which sources and the code in the file is executed whenever a login shell is used. If you don't want to auto start X Window System then you may boot into single runlevel. Also the script will start only one X session.

Setup auto start
Login as root and execute the following: cat > /etc/profile.d/startx.sh << EOF if [ -z "${DISPLAY}" ];then # Source scripts in /etc/X11/xinit/xinitrc.d/    if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do            [ -x "${f}" ] && source "${f}" done unset f    fi     # Execute the Desktop Environment/Window Manager exec startxfce4 fi EOF And make sure the script file is executable: chmod +x /etc/profile.d/startx.sh
 * 1) !/bin/sh
 * 2) Executed by startx