How to open X Display on the server side (locally operable remote interface)

The problem is this:
processes some photos on the server, and sometimes you want to look directly at the images on the server. But the server is Ubuntu Server, with no graphical interface. If we use feH, or cv2.imshow(), the error will be reported as follows:
Feh ERROR: Can’t open X display. It is running, yeah?
Solutions:
It should be in the server side ~/.bashrc file

export DISPLAY=localhost=10.0
On the server side the /etc/ssh/ssh_config file should be set to :

Host *
ForwardX11 yes

Use the following parameters when sshing to the server.
ssh -CAXY [email protected]


Read More: