This is very simple. Open the command line and perform the following steps

First let us install the prerequisites.

sudo apt-get update

sudo apt-get install lightdm

sudo apt-get install lxsession

 

After successfully install the above packages, open the raspi-config. Type the following command in the commandline

 

sudo raspi-config

 

This will open up a pop up box with various options. Select “Boot Options” 

After this, you will get another list of options and select the “B1 Desktop/CLI” option.

On click of that will open up another list and here you have to select “B4 Desktop Autologin”

Here you can select any option depending upon your requirement.

Sample screenshots of the same are given below.

gui_login01
First Screen
gui_login02
After selection the Boot Options
gui_login03
B4 Desktop Autologin