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:
[root@ecs-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 /etc/ssh/sshd_config
:
#AllowAgentForwarding yes
AllowTcpForwarding yes #enable
#GatewayPorts no
X11Forwarding yes #default is enable
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
Then restart the sshd service:
[root@ecs-d589 ~]# 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
Read More:
- How to open X Display on the server side (locally operable remote interface)
- ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule
- [Solved] Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables –wait -t na…
- [Solved] Error: X_LINK_COMMUNICATION_NOT_OPEN or X_LINK_ERROR
- How to Fix xterm Xt error: Can’t open display: xterm: DISPLAY is not set
- [Solved] Ubuntu Open jpg Image Error: Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)
- [Solved] WSUS client access server exception error – 0x8024401f
- Win10 Start Linux error: Error: 0x800701bc WSL 2 [How to Solve]
- How to Solve Error: “Hdaudio hdaudioc0d2: unable to bind codec”
- Linux: How to Solve Rabbitmq Plug-in Install Error
- Ubuntu Server: How to Install Chrome
- Resolving yum source-related issues: Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
- [Solved] wsl Error: WslRegisterDistribution failed with error: 0x800701bc
- How to Solve Oracle startup monitoring error
- How to set fixed IP address for Raspberry Pie
- How to Solve Ubuntu “Failed to fetch” Error
- How to Solve insufficent privileges error: Ora-01031
- Linux: How to Fix undefined reference to `itoa’
- How to Solve gtid master-slave replication connecting Issue
- How to Solve No approve protocol error when running kettle on Linux