How to switch x-session-manager?
Use the following command:
sudo update-alternatives --config x-session-manager
Select Gnome, and the following command:
sudo update-alternatives --config x-window-manager
Make sudo command execution passwordless
sudo visudo
In editor change line
%sudo ALL=(ALL:ALL) ALL
to
%sudo ALL=(ALL:ALL) NOPASSWD:ALL