Failed to open x11 screen: unable to connect

A server that supports a graphic display is different from the server I am uploaded to. When I try to open a virtual box, I get this message.

$ Failed to open the X11 display! 

When I try to start startx, I get three error messages.

 $ PAM authentication failed, cannot start X server $ giving up. $ xinit: No such file or directory (errno 2): unable to connect to X server $ xinit: No such process (errno 3): Server error. 

I do not know where the display variable is, since I am very new to Linux. Any simple tips and help would be appreciated.

+4
source share
1 answer

Give the -X option on the command line to enable X11 forwarding (graphical interfaces).

 ssh -X user@hostname 

It can also be enabled for each node by setting "ForwardX11" to "yes" in the configuration file (~ / .ssh / config). X11 forwarding support should also be included in the target server sshd configuration file (/ etc / ssh / sshd_config) with the X11Forwarding yes option.

You should also be aware that there are some security implications when enabling X11 forwarding. Read more from the ssh and sshd man pages or here . If you control both the server and the client and trust the same, there should not be any problems when enabling forwarding.

+4
source

All Articles