[CentOS] CentOS 8 and xhost

Sat Apr 18 20:18:03 UTC 2020
Liam O'Toole <liam.p.otoole at gmail.com>

On Sun, 19 Apr, 2020 at 15:14:49 -0700, Jerry Geis wrote:
> I am trying to run 'xhost +'  on CentOS 8 (such that I can grab a screen
> shot)
> but its not letting me.
> 
> On boot of X I run the "xhost +"
> then later with SSH into hte box - I run
> export DISPLAY=:0.0
> gnome-screenshot -f jj.png
> and I get the cannot open display message.
> 
> This works on the older CentOS 7.  What is the magic for C8?
> Thanks,
> 
> Jerry

CentOS 8 runs GNOME on Wayland by default. X forwarding cannot work in
those circumstances. To change that, choose "GNOME on Xorg" after
clicking on the gear icon on the login screen.

I recommend running ssh with the -X or -Y flags when connecting to the
remote box. It's more secure than using 'xhost +'.