how to restart x window manager in ubuntu 18.04

Shell
sudo systemctl restart display-manager

Source

Also in Shell: