Start X server on Google Cloud (Debian) Compute En

2019-07-10 07:02发布

问题:

I have set up a Debian(jessie) VM on Google cloud. I have installed Xfce with needed dependencies. Now I am trying to start the X display server with command 'startx' But I get following error

--------
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)
--------------------------------------------------------

There are a few solutions proposed on the internet and most of them suggest sshd config changes. My sshd_config file now has following entries(amongst others)

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

X11Forwarding is set to yes on my local machine as well.

Is there is a known limitation/setting of Google cloud that is causing this?

Thanks for your help and suggestions!

回答1:

If you intend to run XFCE on the remote host and have the user interface appear on your local computer, you need to run an X server locally and have the remote XFCE connect to it.

For example, run Xephyr:

Xephyr :1 &
xterm -display :1

Then, in the xterm window inside Xephyr, ssh to the remote host and start xfce. If X11Forwarding is enabled you will see the desktop load inside Xephyr, but it will likely be painfully slow. X11 was not designed to be used over links with high latency.



回答2:

If you're not interested in using the remotely running XFCE and you only want an X server for test automation, use Xvfb instead x.org. It does not require video hardware to be installed.

On the remote host:

xvfb :1 &
export DISPLAY=:1
startxfce4 &