Headless Fedora 20 and VNC with autologin

30th May, 2014

“Oh no! Something has gone wrong” message is all what you get when you VNC to Gnome 3 in Fedora 20 on a box without any physical monitor attached to any of the video outputs with enabled autologin and screen sharing (vino).  There is an error in /var/log/messages ‘TypeError: this.primaryMonitor is undefined’ at /usr/share/gnome-shell/js/ui/layout.js:410.  I haven’t found a Fedora bug open for this.

You cannot also simply configure e.g. tiger-vnc because of other two bugs, one closed and one open preventing login screen from entering the password – as somebody would be pressing the entry key on and on.

I was not able to find a straight and simple fix unless I’ve hit this solution for Ubuntu, and ported it to Fedora 20:

  • #yum install xorg-x11-drv-dummy
  • put this content to /etc/X11/xorg.conf (you will probably need to create the file):

Section “Monitor”
Identifier “Monitor0″
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
Modeline “1280×800″  83.46  1280 1344 1480 1680  800 801 804 828 -HSync +Vsync
EndSection

Section “Device”
Identifier “Card0″
Option “NoDDC” “true”
Option “IgnoreEDID” “true”
Driver “dummy”
EndSection

Section “Screen”
DefaultDepth 24
Identifier “Screen0″
Device “Card0″
Monitor “Monitor0″
SubSection “Display”
Depth 24
Modes “1280×800″
EndSubSection
EndSection

You can then VNC to port :0 and you will be logged in directly without a need to enter the user password.  I suggest SSH tunneling.

 

5 Responses to “Headless Fedora 20 and VNC with autologin”

  1. Felix says:

    Thankyou very much. Works very good. But when connecting a monitor it doesn’t show a picture. Is there a way to get it working wih a monitor connected as well without a monitor connected?

    • Honza Bambas says:

      Yes, there is a fault that it won’t start X11 with this setting when a monitor is plugged in. I unfortunately don’t know about a solution right now, sorry :( I will ask Michal Novotný, a linux/Fedora guru. He may know. If I find out something, I will update the post.

      • Felix says:

        Thanks for your help. I stumble over another difficulty: I cannot unlock my screen. Neither after manually locking the Gnome Session nor after locking the session through the screensaver. After locking its impossible for me to unlock or to login as another user and even after restarting gdm.service no login is possible. There remains always the lock screen. Theres no error in journalctl.

        Maybe you or your contact has some information on this issue too.

        • Honza Bambas says:

          Isn’t it one of these two bugs?

          Note that I have setup autologin for the user and disabled locking of the screen (obviously.)

          • Felix says:

            Yes, these bugs describe my unlock-problem. I gonna monitor them as well as the results regarding the connection of a real monitor here. Thank you!

Leave a Reply

CAPTCHA Image
 (required)

Highslide for Wordpress Plugin