Create a gist now

Instantly share code, notes, and snippets.

Embed
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 http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup.

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

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=108862#p108862

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]
      Encoding=UTF-8
      Type=Application
      Name=X11VNC
      Comment=
      Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
      StartupNotify=false
      Terminal=false
      Hidden=false
    
  • save and exit (Ctrl-X, Y, )

Turning on Bonjour

http://gettingstartedwithraspberrypi.tumblr.com/post/24398167109/file-sharing-with-afp-and-auto-discovery-with-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">
      <service-group>
          <name replace-wildcards="yes">%h</name>
          <service>
              <type>_afpovertcp._tcp</type>
              <port>548</port>
          </service>
      </service-group>
    
  • 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”

@david-j-davis

This comment has been minimized.

Show comment
Hide comment
@david-j-davis

david-j-davis Dec 17, 2016

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

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