4

I'm running Ubuntu 12.04 and I want to boot directly and headless in the terminal (no GUI). After that I want to startx to start a program in xterm.

When I boot 'headed', everything is working like supposed to, but: - When I boot headless, startx is not working (no screens found)

I already tried to change xorg.conf to below, but it didn't not work:

Section "Device"
    Identifier     "VNC Device"
    Driver         "vesa"
EndSection

Section "Screen"
    Identifier     "VNC Screen"
    Device         "VNC Device"
    Monitor        "VNC Monitor"
    SubSection     "Display"
        Modes "1280x1024"
    EndSubSection
EndSection

Section "Monitor"
    Identifier     "VNC Monitor"
    HorizSync       30-70
    VertRefresh     50-75
EndSection

How can I boot headless and still be able to run startx?

ANSWER:

Adding the BusID to the Devices section in the xorg.conf above, fixed the problem for me.

BusID "PCI:1:00:1"
NeViXa
  • 41
  • 1
  • 1
  • 4

2 Answers2

1

In your Xorg.conf try using the dummy driver instead of vesa. After running startx you should then execute export DISPLAY=:0 (:0 for the first X display), then you can run xterm, which you will not see of course.

I assume you want to connect via vnc, or something similar afterwards.

Paul Hänsch
  • 3,237
0

Maybe you mean to gain shell access to the headless server? Install openssh-server on it and use ssh to connect to that from another computer. THEN, from your workstation, you can ssh -X serverhostname to ssh with X into that headless server. Once on the command line, you can run xterm & and then a new window will pop up on YOUR local X session from that remote machine. So you do still install xterm (or any other gui program) on the server but you do not install any pseudo packages like ubuntu-desktop. I often install firefox, nautilus, and xfce-panel (and many utilities) on a server then I will run that panel on my local desktop and can monitor the server this way.

Krista K
  • 353