Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Getting a Raspberry Pi set up for x11vnc and Bonjour (mDNS) access

Getting my Raspberry Pi set up

Getting on the network

Before the rest of this gist is useful, you've got to get your Raspberry Pi on the network. I followed the information from the Adafruint Learning System Raspberry Pi tutorials, which can be found at

Couple of additional network setup notes

The two files that are most important are

  • /etc/network/interfaces (for network interface config)
  • /etc/wpa_supplicant/wpa_supplicant.conf (for WiFi config)

Setting up x11vnc

steps: install and set password

  • sudo apt-get install x11vnc
  • x11vnc -storepasswd

create autostart entry

  • cd .config

  • mkdir autostart

  • cd autostart

  • nano x11vnc.desktop

  • paste following text:

      [Desktop Entry]
      Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
  • save and exit (Ctrl-X, Y, )

Turning on Bonjour

  • First run “sudo apt-get install avahi-daemon”.

  • Next, make sure it runs at startup, enter “sudo update-rc.d avahi-daemon defaults”.

  • Create a configuration file containing information about the server. Run “sudo nano /etc/avahi/services/afpd.service”*

  • Enter (or copy/paste) the following:

      <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
      <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
          <name replace-wildcards="yes">%h</name>
  • Press ctrl and x to exit, then press y to to save changes and return after confirming the location.

  • Restart Avahi: “sudo /etc/init.d/avahi-daemon restart”


This comment has been minimized.

Copy link

@david-j-davis david-j-davis commented Dec 17, 2016

Why is x11vnc necessary and what if you already installed tightvncserver and xrdp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment