PDA

View Full Version : [ubuntu] Headless server fails to load GUI without attached monitor



zgerrz
July 26th, 2010, 04:43 AM
Hi,

I am running a server that is mostly headless, but does run the Gnome environment (I have ubuntu-desktop installed). I usually administer it via VNC over SSH.

My problem is that when I reboot the system over SSH, the system fails to fully load the GUI, which prevents me from connecting via VNC (although SSH still works). When I connected a monitor and rebooted, the system booted up fine. It appears that the GUI will not load without an attached monitor, which never happened before in previous Ubuntu versions.

I know some out there will yell at me for not learning the CLI, but I do use many commands but prefer a GUI for certain tasks and visualization of my work since my system has the resources to spare.

I would appreciate any assistance. Thanks.

EDIT: running Lucid Lynx

zgerrz
July 27th, 2010, 06:35 AM
bump

P4man
July 27th, 2010, 10:07 AM
You can use a GUI over ssh but that doesnt mean you need to run gnome or vnc on the headless server.

From your desktop ssh in to the headless server and start gnome:

ssh -X user@yourserver gnome-panel

or just launch a specific gui app:

ssh -X user@yourserver "gedit /some/file"

That should be faster than VNC and accomplish the same without requiring a monitor or gnome running remotely.

If you really must have gnome on the server and forward it with vnc, then the only solution i know off is a VGA dummy:
http://www.soerennielsen.dk/mod/VGAdummy/index_en.php

zgerrz
July 27th, 2010, 05:23 PM
Thank you for the response.

I have tried in the past to use SSH to run GUI programs, but I often get the error unable to open display. I'm not sure what I need to change to be able to open GUI programs.

I'm surprised that I'm only having this issue with Lynx regarding the pc not booting up without an attached monitor. I would think there would be a more elegant solution that using a dummy VGA connector. Maybe some sort of xorg.conf option. That's just me.

P4man
July 27th, 2010, 06:45 PM
you need to enable x forwarding to run gui programs. -X (uppercase!) switch in the ssh client and it has to be enabled on the server (on by default afaik).

As for being the only one; you arent; but usually headless servers dont have the gui running. there is no point really. Let it boot without gnome and you can still ssh and start gnome on your client with the command above if you want a gui remotely. Locally you would pretty much never want a gui since you have no monitor.

i.r.id10t
July 27th, 2010, 07:52 PM
IN your gdm config tell it to not start a local X server ...

zgerrz
July 28th, 2010, 05:23 PM
Well I've figured out how to use X11 forwarding to suit my needs.

One last question. How do I set the server to boot without starting gnome or the X server? Do I need the X server to be running on the server to use X11 forwarding?

Thanks