WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: VNC without a monitor attached  (Read 4042 times)

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
VNC without a monitor attached
« on: November 26, 2016, 07:31:59 PM »
Apologies for yet another question.

Then I try to start x11vnc on a RPi without any monitor attached, it will not start with an error unable to open the X DISPLAY.

Is it possible to use vnc on a headless RPi?

Thanks

Tim.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VNC without a monitor attached
« Reply #1 on: November 26, 2016, 08:45:27 PM »
When attemptin to run  x11vnc  without an X server running ...
Code: [Select]
[...]
*** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

Some tips and guidelines:

** An X server (the one you wish to view) must be running before x11vnc is
   started: x11vnc does not start the X server.  (however, see the -create
   option if that is what you really want).
[...]
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VNC without a monitor attached
« Reply #2 on: November 26, 2016, 08:48:25 PM »
However, if  TC.tcz  is loaded onboot, or if  startx  was issued by other means, it does work.
Download a copy and keep it handy: Core book ;)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: VNC without a monitor attached
« Reply #3 on: November 27, 2016, 05:14:42 AM »
x11vnc always attaches to an existing screen. Use a different vnc server for a virtual screen.
The only barriers that can stop you are the ones you create yourself.

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: VNC without a monitor attached
« Reply #4 on: November 27, 2016, 02:28:42 PM »
I have fixed this by setting hdmi_force_hotplug=1 in config.txt so it always thinks that an HDMI monitor is attached.

One slightly related issue is that over VNC the keyboard repeat did not work. It appears that windows only sends repeated keyDown messages without any keyUp messages. The fix is to add -repeat to the startup of x11vnc.

Thanks for your help.

Tim