Headless X Server Linux


Recommended Posts

If you want to use it for administration and other purposes, I suggest you familiarize yourself with FreeNX.

freenx.berlios.de

You can acquire the client to use with FreeNX for Windows and Linux from:

www.nomachine.com

This way you can 'skip' the headless issues (There are some with different applications).

Since when is it possible to see a "normal X session" over SSH via X forwarding? You don't need a framebuffer to do that. Just install X on the server, enable X forwarding, and then SSH over. You'll be able to run X applications, such as firefox, not an X session (such as GDM).

Ok I think I understand what needs to be done but the problem is I can't get the X server to run in the first place so forwarding and all that is secondary. Each time I try runnin the X server with startx it exits with the following error

Fatal server error:

xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

Any help?

Since when is it possible to see a "normal X session" over SSH via X forwarding? You don't need a framebuffer to do that. Just install X on the server, enable X forwarding, and then SSH over. You'll be able to run X applications, such as firefox, not an X session (such as GDM).

No, it's not possible to see a "normal X session" via X forwarding, but VNC can be used to do this. I've done this many times. You need x11vnc and you forward the VNC connection over SSH, quite easy.

To the OP, this is very easy. You need Xvfb (X virtual framebuffer). This server creates a framebuffer in memory to which it renders. Here are the steps.

1. Launch the X server using the following command on the server:

Xvfb :1 -screen 0 800x600x16 -ac

This will create a X server with a 800x600 screen on display :1 and disable access controls. You should probably launch this in the background.

2. Once the server is up, run an application which connects to display :1 The first app you'll probably want to run is a WM. Maybe you'll want to run blackbox with the following command:

DISPLAY=:1 blackbox

3. From your client computer, create an SSH connection to the server, tunneling port 5900 (VNC server 0) and run the application x11vnc. The following command can be used from a terminal (bash, csh, etc):

ssh -l username -L 5900:localhost:5900 localhost 'x11vnc -localhost -display :1'

4. From your client computer, use a VNC viewer and connect to localhost.

Ok, maybe not so easy, and a bit confusing. But once you done it several time, it makes perfect sense and you realise it's VERY easy.

  • 2 years later...

Hello all!

I needed to do exactly what described in the previous post but, as soon as I run the command:

Xvfb :1 -screen 0 800x600x16 -ac

I receive the following error, which I really have no clue on how to solve (also googled a lot, but not able to find any solution):

# Xvfb :1 -screen 0 800x600x16 -ac

(EE) config/hal: NewInputDeviceRequest failed

(EE) config/hal: NewInputDeviceRequest failed

(EE) config/hal: NewInputDeviceRequest failed

(EE) config/hal: NewInputDeviceRequest failed

(EE) config/hal: NewInputDeviceRequest failed

Any hints?

Many thanks!

No, it's not possible to see a "normal X session" via X forwarding, but VNC can be used to do this. I've done this many times. You need x11vnc and you forward the VNC connection over SSH, quite easy.

To the OP, this is very easy. You need Xvfb (X virtual framebuffer). This server creates a framebuffer in memory to which it renders. Here are the steps.

1. Launch the X server using the following command on the server:

This will create a X server with a 800x600 screen on display :1 and disable access controls. You should probably launch this in the background.

2. Once the server is up, run an application which connects to display :1 The first app you'll probably want to run is a WM. Maybe you'll want to run blackbox with the following command:

3. From your client computer, create an SSH connection to the server, tunneling port 5900 (VNC server 0) and run the application x11vnc. The following command can be used from a terminal (bash, csh, etc):

4. From your client computer, use a VNC viewer and connect to localhost.

Ok, maybe not so easy, and a bit confusing. But once you done it several time, it makes perfect sense and you realise it's VERY easy.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.