Can't open display?
Ensure DISPLAY is exported and equal to host's DISPLAY.
$ export DISPLAY=:0No protocol specified?
- Ensure 
XAUTHORITYis exported - Ensure 
XAUTHORITYfile exists - Ensure 
XAUTHORITYfile is read/writeable by your user/group - Ensure 
XAUTHORITYfile equals host's (or otherwise valid) 
$ stat .Xauthority
  File: .Xauthority
  Size: 50              Blocks: 8          IO Block: 4096   regular file
Device: 10301h/66305d   Inode: 1194630     Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/  ubuntu)   Gid: ( 1000/  ubuntu)
Access: 2020-01-12 05:51:31.886546399 +0000
Modify: 2020-01-12 05:51:31.874546400 +0000
Change: 2020-01-12 05:51:31.874546400 +0000- Ensure hostname matches cookie
 
$ hostname
bad_hostname
$ xauth list
good_hostname/unix:0  MIT-MAGIC-COOKIE-1  00000000000000000000000000000000
$ sudo hostnamectl set-hostname good_hostname