2 Star 1 Fork 0

zhrun8899 / learning-notes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
centos远程桌面连接.md 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
zhrun8899 提交于 2019-01-31 14:05 . 20190131

第一步:

先下载图形界面GNOME yum groupinstall "Desktop" yum groupinstall "X Window System" yum groupinstall "Chinese Support"

第二步:

修改/etc/X11/xdm/Xaccess 如果没有xdm该目录,则需要安装xdm yum install xdm 用vi打开后找到 #* *any host can get a login window 将前面的#去掉变成

  •                    *any host can get a login window

第三步:

修改/etc/gdm/custom.conf

[daemon]

[security]

AllowRemoteRoot=true  //添加1

[xdmcp]
Port=177   //添加2
Enable=1    ////添加3

[gui]

[greeter]

[chooser]

[debug]

第四步 错误提示处理

如果startx启动出现如下 [root@cloud ssh]#startx xauth: creating new authority file /root/.serverauth.3234

Fatal server error: Server is already active for display 0 ​ If this server is no longer running, remove /tmp/.X0-lock ​ and start again.

(EE) Please consult the CentOS support ​ at http://wiki.centos.org/Documentation for help. (EE)

或者gdm启动出现如下 [root@cloud ssh]#gdm

** (gdm-binary:3256): WARNING **: Failed to acquire org.gnome.DisplayManager

** (gdm-binary:3256): WARNING **: Could not acquire name; bailing out

都没有影响.

第五步

接下来使用XManager4连接

我使用的是Xstart

填写主机名,协议选SSH,用户名,密码,命令选GNOME,点击run就行了.

第六步 ssh 错误处理

Sent password. Sent password. Access granted. Sent X11 forwarding request... Failed.

如果出现以上情况就修改

vi /etc/ssh/sshd_config #X11Forwarding no 修改为:X11Forwarding yes

然后重启ssh

service sshd restart

1
https://gitee.com/zhrun8899/learning-notes.git
git@gitee.com:zhrun8899/learning-notes.git
zhrun8899
learning-notes
learning-notes
master

搜索帮助