在 Google Cloud (Debian) Compute Engine 上启动 X 服务器

Start X server on Google Cloud (Debian) Compute Engine

我已经在 Google 云上设置了一个 Debian(jessie) 虚拟机。我已经安装了具有所需依赖项的 Xfce。现在我尝试使用命令 'startx' 启动 X 显示服务器,但出现以下错误

--------
Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) 
Fatal server error:
(EE) no screens found(EE) 
--------

Following messages are present in /var/log/Xorg.0.log

----------------------------------
many lines before this

[  3535.932] (WW) Falling back to old probe method for modesetting
[  3535.932] (EE) open /dev/dri/card0: No such file or directory
[  3535.932] (WW) Falling back to old probe method for fbdev
[  3535.932] (II) Loading sub module "fbdevhw"
[  3535.932] (II) LoadModule: "fbdevhw"
[  3535.932] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  3535.932] (II) Module fbdevhw: vendor="X.Org Foundation"
[  3535.932]    compiled for 1.16.4, module version = 0.0.2
[  3535.932]    ABI class: X.Org Video Driver, version 18.0
[  3535.932] (EE) open /dev/fb0: No such file or directory
[  3535.932] (WW) Falling back to old probe method for vesa
[  3535.932] (EE) No devices detected.
[  3535.932] (EE)
--------------------------------------------------------

互联网上提出了一些解决方案,其中大多数建议更改 sshd 配置。我的 sshd_config 文件现在有以下条目(以及其他条目)

-----------
X11Forwarding yes
X11UseLocalhost no
X11DisplayOffset 10
AddressFamily inet
-----------

X11Forwarding 在我的本地机器上也设置为是。

是否有已知 limitation/setting 的 Google 云导致此问题?

感谢您的帮助和建议!

如果您打算 运行 远程主机上的 XFCE 并在本地计算机上显示用户界面,您需要在本地 运行 X 服务器并让远程 XFCE 连接到它.

例如,运行 西弗尔:

Xephyr :1 &
xterm -display :1

然后,在Xephyr里面的xtermwindow中,ssh到远程主机并启动xfce。如果启用了 X11Forwarding,您将在 Xephyr 中看到桌面加载,但它可能会非常慢。 X11 并非设计用于具有高延迟的链接。

如果您对远程使用 运行 XFCE 不感兴趣,并且只想使用 X 服务器进行测试自动化,请改用 Xvfb x.org。它不需要安装视频硬件。

在远程主机上:

xvfb :1 &
export DISPLAY=:1
startxfce4 &