So your Raspberry Pi has just arrived in the post and you're anxious to get playing, but alas, you don't have a spare keyboard, mouse and monitor at hand or you can't use any of the monitors and TVs available to you. This post details how you can use a single computer and network cable to get your Raspberry Pi up and running with VNC without ever having to connect a keyboard, mouse or monitor to it.
2012-07-15-wheezy-raspbian.zipdirectly from Raspberry Pi's download page.
Install the OS onto the SD Card as per the RPi Easy SD Card Setup instructions.
My Dell E6410 laptop has an SD Card slot and I run Ubuntu on it, so this was a simple case of running:
$ sudo dd bs=1M if=./2012-07-15-wheezy-raspbian.img of=/dev/mmcblk0
(Optional) Manually resize the SD card to consume the full space using parted(1M)
$ sudo parted /dev/mmcblk0
etc/network/interfacesfile on your SD card and configure the IP address you desire, eg
iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
Full network configuration instructions can be found on the Debian wiki.
etc/dhcp/dhclient-enter-hooks.d/debugfile on the SD card and change
RUN="no"on line 10 to
RUN="yes"and save the file.
tmp/dhclient-script.debugfile. The contents will look similar to the following:
Sun Jul 15 19:42:26 UTC 2012: entering /sbin, dumping variables. reason='REBOOT' interface='eth0' new_ip_address='10.167.234.240' ⬅ HERE'S YOUR IP ADDRESS new_network_number='10.167.224.0' new_subnet_mask='255.255.240.0' new_broadcast_address='10.167.239.255' new_routers='10.167.224.1' new_domain_name='your.domain.com' new_domain_name_servers='10.167.162.20 10.167.162.36 220.127.116.11' new_netbios_name_servers='10.167.172.57 10.167.172.66'
Take note of the IP address. Thanks to the fact that DHCP will always try and reuse IP addresses requested by a client in a short period of time, we can be pretty confident we'll get the same IP address when we next boot the RPi (provided we don't leave it too long).
You don't need me to tell you what to do here :-)
Install VNC Server
$ sudo apt-get install tightvncserver
Start VNC Server
$ vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565
For those who like screenshots, here's me connecting to my RPi after following the above...
At this point you may want to consider adding your own user and either remove the default user or at least change the default password. I'll leave that to you to decide.
Update: Spammers have spoiled the party folks. This post has suddenly become very popular with spammers so I've disabled comments on it. If you wish to comment, please feel free to comment via Twitter (@lildude) or via Google+