First of all, you can execute this command to set some default parameters:

sudo raspi-config

In the Boot menu, my advice will be to disable the automatic launch of the desktop environment and the autologin by selecting:

Boot Options / B1 Desktop / CLI / B1 Console

 

But here you have more command lines to do it manually:

 

CHANGE KEYBOARD LAYOUT

vi /etc/default/keyboard

then change the value of: XKBLAYOUT=”gb” to “us”, “fr” or “be” in my case, then “:wq” to save

 

ADD A USER

sudo adduser NEWUSERNAME

Now add this new user to the sudoers list (to have root privilèges):

sudo visudo

Then under “root”, copy the previous line and replace root by your NEWUSERNAME.

NEWUSERNAME ALL=(ALL:ALL) ALL

 

DELETE DEFAULT PI USER

sudo userdel -r pi

 

START THE DESKTOP FROM COMMAND LINE

startx