1.First we need to enable or set root password using below command,you can open a terminal via Ctl+Alt+t

sudo -s
passwd root

2.To allow root login gui ,we need to modify /etc/pam.d/gdm-password to uncomment below line .(Add a “#” to the beginning of the line)

#auth	required	pam_succeed_if.so user != root quiet_success
3.We still need to modify /root/.profile as below , or there maybe an error prompted when you login using root account.Just as the image below you need to uncomment line “_mesg n   true_” and replace it with 3 lines as showed


4.Done , good luck and enjoy