Ubuntu 20.04 LTS Can’t Enable Screen Sharing
This happens if the internet connection is shown as “unmanaged“. So you need to edit this file to make it “managed“:
sudo nano /etc/NetworkManager/NetworkManager.conf
Change managed=false to true. Then restart the network-manager:
sudo service network-manager restart
Make sure network is managed by network-manager:
sudo sed -i '/^network:/a \ renderer: NetworkManager' /etc/netplan/50-cloud-init.yaml
Apply changes
sudo netplan apply
Then reboot.