Ubuntu 9.10 makes a great OS for a home server, but if you’re not comfortable using terminal commands to setup and administer your box you may quickly run into a problem with the Desktop Edition of Ubuntu…
Just recently I’ve repurposed an ASUS EeeBox into a nice little file server running Ubuntu 9.10. The EeeBox is ideal, as it’s tiny, hardly uses any power or generate heat, and hides nicely under my sofa. The problem is that once setup I wanted to access this box remotely using a mixture of SSH and Remote Desktop, but Ubuntu (and possibly other flavours of Debian?) does not complete the login process if it doesn’t detect a monitor connected to the graphics card. All server-based services happily start, but the OS doesn’t seem to load the UI or any applications that are designed to launch once the user logs in.
The solution took some hunting down, but it’s simple to implement. Just pop open the terminal (either on the server, or SSH into it from another machine), and follow these instructions:
- Type the following command:
sudo nano /etc/X11/xorg.conf
- This may create a new file, which is fine. Now simply copy and paste the following text (If text already exists in the file, just delete it and replace it with this):
Section "Device" Identifier "VNC Device" Driver "vesa" EndSection Section "Screen" Identifier "VNC Screen" Device "VNC Device" Monitor "VNC Monitor" SubSection "Display" Modes "1024x768" EndSubSection EndSection Section "Monitor" Identifier "VNC Monitor" HorizSync 30-70 VertRefresh 50-75 EndSection
- Now press CTRL+O then CTRL+X to save and exit the Nano text editor.
- Now simply reboot your Ubuntu server – disconnecting any monitors you had connected. You’ll now find that Ubuntu boots and logs in, allowing you remote access to your desktop.
Note that the line Modes “1024×768” can be changed to any resolution you desire.
I personally prefer 1400×900*, but that’s up to you.
*UPDATE: Please be aware that the resolution you choose needs to be a standard VESA 4:3 or 5:4 resolution. If you’re unsure, just use the default above, and then once you’re logged in look at your available resolutions in the Display settings.
*UPDATE 2: This fix doesn’t appear to be working in Ubuntu 10.04 beta 2. There is a slightly more complicated fix which I’m looking into, which basically involves installing vnc4server – but I’ll post a new article when 10.04 is released.
A simple solution – I’m amazed that this functionality isn’t already built into the Desktop edition!
Rich Bos · 4 January 2010 at 10:29 am
Most useful Oli. We run a local Ubuntu development server in the JING office over in Costa Rica which also has the Gnome desktop installed, interestingly however it’s wired into a KVM which is enough for it to boot & auto-login even if it’s channel isn’t selected at the monitor end.
Oli · 4 January 2010 at 3:00 pm
Yeah, that would be an easier hardware solution to the problem. We have a similar problem with an almighty XServe funnily enough. If it doesn’t see a monitor (either a real one or a KVM) then it wont load the graphics card. I can still VNC into it, but if I try an launch any apps that require a “Quartz Compatible Card” they wont launch. Very difficult to administer a video server without a monitor permanently attached!
Jakes · 15 January 2010 at 4:53 am
Great Stuff! Thank you very much!!!
gtremik · 18 January 2010 at 11:16 pm
Thank you very much! 🙂 I tried to find a solution for nearly all the Polish forums and sites, and no one could help me. Again, thanks. (and sorry for my poor English)
Enda O'Neill · 19 February 2010 at 7:28 pm
Thank you soooo much! I’ve had a purpose built server sitting in my cupboard for weeks as I’m new to Linux and couldn’t find a simple solution to this problem. 🙂
Dan · 21 March 2010 at 12:30 am
I was using remote desktop on Ubuntu 9.04 without problems, then I upgraded to 9.10 and got the problem described. Your solution did the trick. Thank you!
Sebastian · 2 April 2010 at 6:41 pm
This is a great solution. But how were you able to use 1400×900 as resolution? I just get the message that this is not supported. So I’m using 1024×768. Thank you.
(I’m already running Ubuntu lucid beta on this machine.)
Oli · 2 April 2010 at 6:54 pm
Hmm. I dont know – It just worked for me. Where does it tell you its not supported? Despite the post, are you sure you’ve not got a monitor plugged in? Have you tried any other 16×9 or 16×10 resolutions? 1280×720 might be worth a go.
UPDATE (10 minutes later!): Hey, what do you know – you’re right. Admittedly, I’ve not VNC’d into my Linux box for a few months now, but something must have changed since I wrote the post. I now only get a selection of 4:3 or 5:4 resolutions to choose from. I’ll keep my eyes peeled for a workaround. Thanks!
Jen · 26 April 2010 at 10:11 pm
Hmm thanks for sharing, fixed my problem!
bart · 2 May 2010 at 11:33 pm
Hi there, have you been able to find a way already for ubuntu 10.04 ? Im still seeking for a solution. thx
Oli · 3 May 2010 at 10:18 am
@bart: Hi, no I’ve not got a working solution for 10.04 yet. In fact, I ended up downgrading my server to 9.10 for this very reason.
One option with 10.04 is to install vnc4server, and connect using that – but it creates a separate session (as it’s supposed to), so it doesn’t solve *all* the problems.
For those of you who just need remote desktop access for admin, then I suggest installing vnc4server and if you need access to USB drives, usbmount.
Hopefully I’ll figure out a fix soon :o)
bart · 16 May 2010 at 3:52 pm
Hi i have found a fix, and its working for me. You have do disable KMS (KernelModeSetting) . Here you can see how to turn it off for Intel, Ati,Nvidia:
I had to type for my intel graphics chip :
echo options i915 modeset=0 > /etc/modprobe.d/i915-kms.conf
Rebooted and now its all working fine 😀 .
Bernhard · 7 August 2010 at 7:41 am
Thank you for your help! (I have the same machine with the same problem.)
Aeos · 15 August 2010 at 2:52 pm
Thanks Oli and bart!
Tonie · 22 September 2010 at 6:28 am
Thanks to both Oli and Bart I’ve got a screenless Ubuntu 10.04 machine running!
@bart I ended up using the nivda option on the provided link
@Oli, I used your xorg.conf setup
simon · 11 October 2010 at 8:58 pm
Thank you for the above; I’ve been trying to get a machine to boot without a monitor so I could remote desktop onto it for a while now. It’s oddly inconsistent (10.04 Ubuntu). I’ll try the suggestions about KernelModeSetting next and the listed X config too.
I’m now assuming (following the success stories above, heh) I’ll be able to get it working without a monitor, but the next obvious step is to try removing the graphics card altogether. Assuming I can get past the BIOS, is there a way to still get a remote desktop onto that machine? In theory it doesn’t need a card at all as it has no display.
Graham · 10 November 2010 at 5:06 pm
Just wanted to add my thanks. Like many other it would seem, I was googling until my eyes turned googley then came across this one which worked, I had to turn off the KernelModeSetting and then copy the xorg.conf.failsafe and remove the failsafe bit and it boots with nothing but the power lead attached.
Next step: booting with no power attached :p
Zotman · 30 January 2011 at 2:32 am
Thanks for the post! I was tearing my hair out setting up my server. Thanks a bunch!
Vamp · 22 April 2011 at 2:42 pm
Thanks a lot! Had to use trial and error to find out, the monitor was the problem. I’m doing the same thing on an Acer eMachine with Ubuntu 10.10, so just to confirm: Together with Bart’s comment it works (meaning I can finally ping it).
abraham · 3 July 2011 at 6:27 pm
Thanks!! Is just what I need to finally config my old-tower-as-NAS 😛
Radu · 9 January 2012 at 9:38 pm
I’ve managed to get Ubuntu 10.04 to start without a monitor attached by modifying the xorg.conf file as described, then updating the /etc/default/saned file to say RUN=yes.
This way I’ve managed to use tightvncserver to remotely connect to the computer. For a strange reason, running the vncserver command automatically at boot made the system run very slow so I have to manually start it through a ssh session when I restart the server.
All the best!
Alex · 17 June 2012 at 2:25 pm
Just a quick ‘thank you’ for this guide from me – it’s taken a while (mostly because I don’t know linux very well) but finally got this working. Great guide & thank you to Bart’s additional info too.
Jonathan Wilkinson · 9 November 2019 at 9:57 pm
I did this and now it will only boot into the command line and won’t show the GUI. I tried raspi-config to change to loading into the gui, and it wont. 🙁