第一步:
run the command(s) below: (編輯如下檔案)
sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
Add the following line, save and then close. (在檔案中加上下面這句)
allow-guest=false
Reboot, and you're set.
第二步:
Thanks to Gunnar Hjalmarsson
Based on Gunnar Hjalmarsson comment "ubuntu-session was last updated in the middle of March. Try sudo apt-get install --reinstall ubuntu-session" when that is done, the Guest session returns. (第一步不是狠完善,guest可以通過某些命令恢復)
After some research, this can be done a different way as well. (除了第一步外,下面這步也操作下)
Open /etc/lightdm/lightdm.conf
file from your terminal using the following command:
sudo -H vi /etc/lightdm/lightdm.conf
If the file exists, then just add the following line:
allow-guest=false
Otherwise copy and paste the following into it: (如果檔案不存在,則新建並加上如下的行)
[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
Save the file and exit the editor. Reboot your system, and the changes will remain even after an update to ubuntu-session as mentioned by Gunnar Hjalmarsson's comment.