---
title: 验证时报“cannot connect to X server”错误
description: "运行验证中报错“PipedViewerPQ: cannot connect to X server”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0168.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0168.html
indexId: 9c7661694fe676eb5900c820e038aa8a91c1fd5c02c0c3a701a0e60ed17562da74
---
# 验证时报“cannot connect to X server”错误

#### 问题现象描述

运行验证中报错“PipedViewerPQ: cannot connect to X server”。


#### 关键过程、根本原因分析

X11-forwarding未开启。


#### 结论、解决方案及效果

1. 执行以下命令退出当前界面。

```
CTRL+ Z
```


2. 执行以下命令

```
yum install -y xorg-x11-xauth xorg-x11-fonts* xorg-x11-font-utils xorg-x11-fonts-Type1 xclock
```


3. 执行以下命令修改“/etc/ssh/sshd_config”文件。

  a. 打开“/etc/ssh/sshd_config”文件。

```
vi /etc/ssh/sshd_config
```


  b. 按“i”进入编辑模式，将第100行的X11Forwarding改为“yes”。
    执行3.a之后，按“Esc”键，输入“:set nu”，按“Enter”即可显示出行号。

  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
4. 执行以下命令重启sshd服务。

```
systemctl restart sshd
```


  重新打开ssh窗口，连接服务器，X11-forwarding显示为对钩，表示开启成功。

5. 重新执行《PyFerret 7.6.0 移植指南（openEuler 21.03）(https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/openmind_kunpengpyferret_02_0012.html)》的“运行和验证”章节步骤7。
