受欢迎的博客标签

Windows使用 SSH+X11转发加速linux远程桌面

Published

I have two machines, Server is running Ubuntu 18.04 x64  and client is running Windows10. I'd like to connect to server from client and start the full graphical interface.

Prerequisites

Server with Ubuntu 18.04 x64 installed.
Client with Windows10 installed.

Table of content

Xshell+Xmanage+X11

XMobaXterm

Xming

XMing doesn't support the X11 security protocol, causing it to default to trusted forwarding.

ptty

 

The X11 protocol makes it possible to send the graphical display to a remote graphical desktop.

You should not need a GUI installed on the Ubuntu server.

1.check x server is runing on the Ubuntu server.

2.configure ssh with ssh+X11 forwarding 

3. use ssh with ssh+X11 forwarding to connect to the Ubuntu server

4.Run the application on Ubuntu server(firefox).

 

原理:软件在本地自建X Server服务,然后服务器Ubuntu server作为X client,把绘图的请求发给本地的X server。 这样就实现了本地显示图像的目的。

step 1:check x server is runing on the Ubuntu server

# ps -ef |grep Xorg
root      5889  3893  0 22:02 pts/0    00:00:00 grep --color=auto Xorg

 

 

1.Windows使用Xshell+Xmanage+X11

1.打开xshell新建会话,配置SSH信息,和正常连接VPS SSH一样:
xshell ssh 信息


2.设置用户身份验证信息:
xshell 用户身份验证信息

3.设置隧道(中转)配置,本地监听端口可以是本地任意其他未被占用的端口:
xshell隧道设置

4,配置完成后连接上SSH,和正常连接SSH一样,不会有任何其他显示。


5,接着打开Windows系统自带的RDP工具 mstsc 用本地IP:设置的端口 就能连接了。例:127.0.0.1:33890 / localhost:33890

 

2.Windows使用XMobaXterm+ssh +X11

Windows系统没有X Server ,所以你得安装个X Server在Windows上的实现,比如XMobaXterm、Xming, 然后启动X server;

XMobaXterm内建X server,可远程运行X窗口程序.无需打开linux图形桌面,直接进行某个图形程序的转发。

step 1: Install XMobaXterm on windows

https://mobaxterm.mobatek.net/download-home-edition.html

 

step 2:

https://mobaxterm.mobatek.net/demo.html

step 3:Launch remote X clients

在ubuntu服务器端命令行下打开运行一个 GUI 程序

ubuntu在命令行下打开图形浏览器

#firefox
#google-chrome-stable –no-sandbox

step 4:

 

使用体验情况

1.使用这种方式连接的远程桌面卡顿厉害(非局域网)

2.测试了不同vps,卡的原因应该不是在带宽部分。

Useful links

linux ServerGUI

https://help.ubuntu.com/community/ServerGUI

How to Install and Use Xrdp Server (Remote Desktop) on Linux System

https://www.ubuntupit.com/how-to-install-and-use-xrdp-server-remote-desktop-on-linux-system/

Linux图形界面知识(介绍X、X11、GNOME、Xorg、KDE等之间的关系)

https://blog.csdn.net/u012822903/article/details/54572807

X11 - How to display remote clients (such as firefox, installation screen) with the X Server CygwinX ?

https://datacadamia.com/ssh/x11/cygwinx_remote_client

 

Ubuntu: X11 forwarding to view GUI applications running on server hosts

 

Xubuntu 18.04 配置x11vnc,修改分辨率,远程访问流畅

远程显示(操作) 服务器 GUI 程序(图形化界面) (基于 X11 Forwarding + Centos + MobaXterm)

SecureCRT 使用X11 转发功能打开图形化窗口
 
使用Xshell+Xmanager完成连接linux远程桌面

Speed up

How to speed up X11 forwarding in SSH

https://www.xmodulo.com/how-to-speed-up-x11-forwarding-in-ssh.html?format=pdf