I have an Ubuntu 14.04 server that has no external monitor connected. I use NoMachine to remote control the machine. When I do so, the Unity/Gnome interface doesn't see any monitors connected, so I can only use 800x600 when connecting with NoMachine. If I plug in a monitor, I can set the resolution to whatever size the NoMachine window is on the remote computer.

Is there a way to create a "fake" monitor device on Ubuntu so I can set a desktop resolution in Unity/Gnome?

share|improve this question
up vote 35 down vote accepted

Found a way to do it without requiring a dummy plug: http://blog.mediafederation.com/andy-hawkins/ubuntu-headless-vnc-vesa-800x600-fix/

Basically install a dummy driver:

sudo apt-get install xserver-xorg-video-dummy

Then write it in the /usr/share/X11/xorg.conf.d/xorg.conf file (create one, if it does not exist):

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection

Then restart the computer.

share|improve this answer
    
related info for those using NoMachine who want to change the screen resolution but have a monitor plugged in on the remote site with a different ratio, so really need the dummy driver: ubuntuforums.org/showthread.php?t=1832456 and xpra.org/xorg.conf and when NoMachine says there are no sessions, debug here: /var/log/Xorg.0.log refresh changes: sudo service lightdm restart sudo su sudo /etc/NX/nxserver --restart exit – Alexander Taylor Nov 28 '14 at 1:23
    
Please edit the answer, the package is being updated. Try sudo apt-cache search video-dummy. – cctan Aug 12 '15 at 9:56
    
What happens when I plug in a real monitor though? Ugh Linux is so archaic. – Timmmm Dec 21 '15 at 10:12
    
Creating the file /usr/share/X11/xorg.conf.d/xorg.conf with this content, or the one from xpra.org/xorg.conf, my Ubuntu does not boot anymore (it gets stuck with the Ubuntu logo screen before the login screen). What can be the problem? – David Portabella Aug 23 '16 at 21:40
1  
Link in the answer appears to be broken. – rsethc Aug 12 '17 at 9:15

Specify the resolution on a Ubuntu 14.04 desktop without a monitor connected:

From the xrandr man page:

--fb widthxheight
   Reconfigures the screen to the specified size. All configured 
   monitors must fit within this size. When this option is not 
   provided, xrandr computes the smallest screen size that will 
   hold the set of configured outputs; this option provides a 
   way to override that behaviour.

Therefore use the command after connecting:

xrandr --fb 1280x1024
share|improve this answer
    
Cool, it's work! – burtsevyg Sep 26 '16 at 10:02
1  
For me it say's: Can't open display – ar2015 Jun 2 '17 at 7:05
    
@ar2015 Run the command as xrandr --fb 1280x1024 -display :0 – Terrance Oct 29 '17 at 23:45

This is a hardware solution/workarround which may work for some graphics hardware/driver.

  • Either you buy a Dummy VGA (or DVI analog) plug or some calling it Dummy Dongle.

  • Or just use 3 resistors of around 75 Ohm at the VGA output: 1→6, 2→7, 3→8.

    +/- 10 Ohm may work without any problem. Some cards work with just one resistor. (Like my Intel, 2→7 or 3→8, will detected as a monitor)

Reference: How to create dummy plugs for your graphics cards.

share|improve this answer
    
Sounds like an interesting idea. I'll give it a shot. – John Chapman Apr 27 '14 at 19:10
1  
Honestly, this is the simplest way to go. There are plenty of tutorials out there for workarounds, but this just plain works and will save you a lot of time. The DIY option seems solid, but dummy plugs on Amazon are $20. Just make sure you get a good one to support your resolution. – Jason Capriotti Feb 22 '17 at 21:19

protected by Community Dec 23 '15 at 21:17

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.