Headless Fedora 20 and VNC with autologin

“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

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

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

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.


6 thoughts on “Headless Fedora 20 and VNC with autologin

  1. 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?

    1. 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.

      1. 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.

        1. Isn’t it one of these two bugs?

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

          1. 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!

    2. Found a solution, also for Fedora 21:

      • enable Screen Sharing in Gnome settings, enable Auto Login for the user (if you already haven’t)
      • #telinit 3
      • login as root
      • #Xorg -configure
      • it will create an xorg.conf.new file outside /etc/X11
      • copy that file as /etc/X11/xorg.conf
      • #reboot

      On Fedora 20 this will just work, on 21, you need to kill vino-server process (#kill `pidof vino-server`) and start manually an xvnc server after startup (I have a manual script, don’t forget to run it for the correct user) ; there is a new bug in F21 preventing vino session from starting properly w/o a monitor attached regardless any xorg.conf file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.