Linux system also has a graphical interface. Its way is different from Windows, called X Window, using the X11 protocol. The X in X11 refers to the X protocol; the 11 refers to the 11th version using the X protocol.
The schematic is above. So when we use the client to log in to a server, when we display the image interface, which is the X client and which is the X server?
The answer is that the client is the X server. For example, we use MobaXterm to log in to the server. MobaXterm is the X Server, and the Linux server is the X Client.
When I log in to my ECS, this graphical interface is unavailable at first: X11-forwarding : ✘ (disabled or not supported by server).
That is to say, when I run a program to display a graphical interface on the server, the result will fail, like the following:
[[email protected]-d589 ~]# xclock Error: Can't open display:
So what to do? In fact, it can be operated in two places, one is to install the X authentication package, and the other is to open ssh forwarding.
The command to install the X authentication package is:
yum install xorg-x11-xauth
its description is as follows:
Summary : X.Org X11 X authority utilities
Description : xauth is used to edit and display the authorization information used in connecting to an X server.
The way to open ssh forwarding is to edit
#AllowAgentForwarding yes AllowTcpForwarding yes #enable #GatewayPorts no X11Forwarding yes #default is enable #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes
Then restart the sshd service:
[[email protected] ~]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service
And log out and log back in.
It can be seen that the first prompt X11-Forwarding is that it has been opened normally, and then we run a simple program xclock on the server, and the clock graphical interface of the program can be correctly displayed on the screen.
In addition, there is an additional error message after logging in as follows, we can ignore it for the time being.
/usr/bin/xauth: file /root/.Xauthority does not exist
- How to Fix xterm Xt error: Can’t open display: xterm: DISPLAY is not set
- [Solved] Ubuntu 20.04.3 Fail to Start sshd Error: Failed to start OpenBSD Secure Shell server
- Vmware virtual Mechine connect VScode Error: channel 3: open failed: administratively prohibited: open failed
- How to open X Display on the server side (locally operable remote interface)
- [Solved] Sshd startup error: Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- Kali starts SSH service error [How to Fix]
- [SSH error] ssh_exchange_identification: read: Connection reset by peer
- Linux First Install oracle Start Error [How to Solve]
- Vmware Virtual Machine ubuntu Compile Error: fatal error: Killed signal terminated program cc1plus
- [Solved] ubuntu Boot Error: /dev/nume0n1p2:clean
- SSH Connect Service Error: Could not connect to ‘xxx.xxx.xx.xx‘ (port 22): Connection failed.
- [Solved] Linux shell Script Error: syntax error near unexpected token `do
- [Solved] WSUS client access server exception error – 0x8024401f
- [Solved] ××: error while loading shared libraries: ××.so.19: cannot open shared object file: No such file or directory
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- [Solved] SSH Startup Error: unable to load host key /etc/ssh/ssh_host_ed25519_key bad permissions
- See system logs and ‘systemctl status docker.service‘ for details
- [Solved] rsync Error: @ERROR: chdir failed rsync error