3

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!

SYM
  • 345
  • 1
  • 3
  • 9
  • 1
    X general expects you to have a local display adapter. you're running on a cloud server, so there is no "head" to attach to. you need to run a headless X. – Marc B Feb 22 '16 at 20:12
  • 1
    Why do you want to start an X11 server there? You don't have access to a monitor keyboard and mouse connected to that machine, so it's kind of pointless. – Joni Feb 22 '16 at 20:12

2 Answers2

2

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.

Joni
  • 108,737
  • 14
  • 143
  • 193
  • Thanks for your response. The problem is that I cannot start xfce on remote host because I cannot run X server there. As soon as I try to run start 'startxfce4', it tries to start the x server on the Debian instance and and I get the same set of error messages mentioned above. – SYM Feb 23 '16 at 05:52
  • Thanks for your response. The problem is that I cannot start xfce on remote host because I cannot run X server there. As soon as I try to run start 'startxfce4', it tries to start the x server on the Debian instance and and I get the same set of error messages mentioned above. Clarification - I am trying to create this set up because I want to test a linux based ui product. I need to test it on multiple flavours of linux. So I thought it will be easier to set up VM instances on cloud instead of installing multiple linux flavours locally. xfce is not important by itself. – SYM Feb 23 '16 at 05:59
  • So you don't actually want to use the xfce installed remotely. – Joni Feb 23 '16 at 08:00
0

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 & #upper case X
export DISPLAY=:1
startxfce4 &
Yaakov Shoham
  • 10,182
  • 7
  • 37
  • 45
Joni
  • 108,737
  • 14
  • 143
  • 193
  • iI have used Xvfb in the past for testing but it was html/js app and I had fully automated that test suite with selenium. My current assignment has got native gui and automation is not easy. Anyway, I got the xfce desktop after a reboot of VM but I have no idea why it worked. It is very slo w but I am able to test the package installation and some flows. I am accepting your first answer. – SYM Feb 23 '16 at 13:38
  • I had used a similar set up with Exceed on local windows desktop and Solaris on remote machine. This was a long time back and with poor network connection. And yet the response times were reasonable as far as I remember. Ihad expected the response to be much better after so many years and 20 times faster internet connections. – SYM Feb 23 '16 at 13:39
  • Internet connections are not actually faster, just "wider." You can transfer more bytes per second, but those bytes don't travel any faster than before. In technical terms, we have more throughput or bandwidth, but latency has stayed the same. And for interactive applications like remote desktop or games it's latency that matters. – Joni Feb 23 '16 at 13:51
  • try TigerVNC or NoMachine NX instead of plain X11 forwarding - they try to solve some of the problems caused by latency – Joni Feb 23 '16 at 13:55