Raspberry Pi Without Keyboard, Mouse Nor Screen

5
2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 1/5 17 Mar 12 Raspberry Pi without keyboard, mouse nor screen. I’ve been wanting to mess around with a Raspberry Pi ever since the day it was announced. The thing is, right now I’m studying abroad, so buying a dedicated set of peripherals (keyboard, mouse, screen, etc..) was not an option. However, it occurred to me that I could use my own MacBook as my RPi’s HMI. After checking some sources and asking around on the IRC channel, I found out that it could be done, so without hesitating I ordered myself one. I’ve written this little guide to help you configure your RPi with a lightweight VNC server to get you started in case you lack the hardware peripherals. 0. Preparing your Raspbian installation I’m not going to get into much detail here since it’s been widely discussed on the web. Basically, you have to load Raspian on a SD card for your RPi to boot. I followed this guide without any issues and the installation process went smoothly. 1. Finding your RPi’s IP address This is actually the “hardest” step since it’s pretty much guessing and a little bit of luck. I’m using my MacBook’s built in “Internet Sharing” feature, I’m sharing my internet connection from WiFi to my ethernet port, to which the RPi is directly connected. Unless you’ve changed something deep in your OS X configuration, by default your computer takes the IP address Edmundo Fuentes Life's random, you better learn how to live it. Search… About An engineering student by day, a designer by heart and a musician without time. Ask @ Contact Twitter Instagram Liked posts Bento : Learn how to code using this curated set of... Photo via uxrave swissserif : wacky-thoughts : NUMERO BY ... Photoset via myfonts Hacking a Raspberry Pi into a wireless airplay speaker Post via jordnburgess Caprichos de una hache que no quiere ser muda. Post via effettosecondario I tried a new thing; drawing with only a black, permanent... Photoset via tildawadin Photo via artisdry theme by paul straw Never miss a post! × edmundofuentes Edmundo Fuentes Follow

description

How to setup raspberry

Transcript of Raspberry Pi Without Keyboard, Mouse Nor Screen

2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes

http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 1/5

17

Mar 12

Raspberry Pi without keyboard, mouse norscreen.

I’ve been wanting to mess around with a Raspberry Pi ever since theday it was announced. The thing is, right now I’m studying abroad, sobuying a dedicated set of peripherals (keyboard, mouse, screen, etc..)was not an option.

However, it occurred to me that I could use my own MacBook as myRPi’s HMI. After checking some sources and asking around on the IRCchannel, I found out that it could be done, so without hesitating Iordered myself one.

I’ve written this little guide to help you configure your RPi with alightweight VNC server to get you started in case you lack the hardwareperipherals.

0. Preparing your Raspbian installation

I’m not going to get into much detail here since it’s been widelydiscussed on the web. Basically, you have to load Raspian on a SD cardfor your RPi to boot. I followed this guide without any issues and theinstallation process went smoothly.

1. Finding your RPi’s IP address

This is actually the “hardest” step since it’s pretty much guessing and alittle bit of luck.

I’m using my MacBook’s built in “Internet Sharing” feature, I’m sharingmy internet connection from WiFi to my ethernet port, to which the RPiis directly connected. Unless you’ve changed something deep in yourOS X configuration, by default your computer takes the IP address

EdmundoFuentes

Life's random, you better learn how to live it.

Search…

AboutAn engineering student by day,a designer by heart and amusician without time.

Ask

@ Contact

Twitter

Instagram

Liked posts

Bento : Learn how tocode using this curatedset of...

Photo via uxrave

swissserif :wacky-thoughts :NUMERO BY ...

Photoset via myfonts

Hacking a RaspberryPi into a wirelessairplay speaker

Post via jordnburgess

Caprichos de unahache que no quiereser muda.

Post via effettosecondario

I tried a new thing;drawing with only ablack, permanent...

Photoset via tildawadinPhoto via artisdry

theme by paul straw

Never miss a post! ×edmundofuentesEdmundo Fuentes Follow

2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes

http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 2/5

192.168.2.1 and creates a DHCP server in the 192.168.2.x range.

To find your RPi’s IP address, open your Terminal and start running pingsfrom 192.168.2.2 to 192.168.2.10. If one of those responds, then we’vefound the RPi. If that fails, you could try using the free software calledAngry IP Scanner to scan the complete range from 192.168.1.2 to192.168.2.254. You should find one device alive that is responding to thescan.

If the IP range scan also fails, then you most likely have a problem withyour RPi itself. Double check that Raspbian was properly loaded ontothe SD card, that the ethernet cable is properly plugged in, and allowsome time after powering up the RPi before attempting to find it.

2. Making the initial connection and setup

Once you have your RPi’s IP address, go ahead in Terminal and connectto it via ssh.

> ssh [email protected]

Replace X with whatever IP address you found. The default user is ‘pi’and the default password is ‘raspberry’.

Congrats! You’re in!

Run the following commands to ensure you have the latest updatesbefore continuing:

> sudo apt-get update

> sudo apt-get upgrade

Then, run the initial Raspbian setup:

> sudo raspi-config

From that menu you can change your password if you’d like, as well assome other basic configurations. Right now select “expand_rootfs” andthen exit the configuration tool. Reboot when it asks you to.

3. Installing TightVNCServer

Connect again to the RPi via ssh, and then run the following commandto install the VNC Server:

> sudo apt-get install tightvncserver

When it’s done, initialize it for the first time by entering

> tightvncserver

Since it’s the first time starting the server, it’s going to ask you to set upyour passwords, do so.

Now it’s time to test your VNC server, but before doing so, I’drecommend you reboot by entering:

> sudo reboot

Log back in once again via ssh, then run this command to start the VNCServer:

> vncserver :1 -geometry 1024x720 -depth 24

From your computer, try to connect to the RPi using any VNC Viewer. For OS X I recommend Chicken of the VNC. The host is your RPi’s IPaddress, the display is ‘1’ and the password is whatever you chosewhen initializing the server for the first time.

If everything went well, you should be able to see your RPi’s desktop.

More liked posts

2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes

http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 3/5

4. Auto-starting the VNC server

The last step is configuring Raspbian to auto-start the VNC server eachtime it boots up, that way you won’t have to connect via ssh first, thenstart the server, then log back in via VNC. To do this, we’ll use a scriptprovided by ‘PenguinTutor ' that I've slightly modified.

Connect to the RPi via ssh and then change to the superuser bash bytyping:

> sudo bash

We’ll now create a script inside the /etc/init.d/ directory. Enter:

> nano /etc/init.d/vncboot

And in the text editor paste the following code:

#!/bin/sh

### BEGIN INIT INFO

# Provides: tightvncserver

# Required-Start: $local_fs

# Required-Stop: $local_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Start/stop tightvncserver

### END INIT INFO

# More details see:

# http://www.penguintutor.com/linux/tightvnc

### Customize this entry

# Set the USER variable to the name of the user to

start tightvncserver under

export USER='pi'

### End customization required

eval cd ~$USER

case "$1" in

start)

2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes

http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 4/5

su $USER -c '/usr/bin/tightvncserver :1 -geometry

1024x720 -depth 24'

echo "Starting TightVNC server for $USER "

;;

stop)

pkill Xtightvnc

echo "Tightvncserver stopped"

;;

*)

echo "Usage: /etc/init.d/tightvncserver {start|stop}"

exit 1

;;

esac

exit 0

You can change the default user for the VNC server and your preferredgeometry configuration by altering the corresponding lines on the script.

To exit the editor and save, press Ctrl + X, then Y, then Enter.

Now let’s make the script executable:

> chown root:root /etc/init.d/vncboot

> chmod 755 /etc/init.d/vncboot

> chmod +x /etc/init.d/vncboot

And finally we’ll add it to the list of auto-starting services

> update-rc.d vncboot defaults

After running that last command, it should say: “Using dependencybased boot sequencing”. If so, everything went well.

Reboot one last time: sudo reboot and after it powers back up try todirectly connect via VNC from your computer without connecting via sshfirst.

Congrats! Now you have a fully working RPi using your own computeras hardware peripherals.

—————

UPDATE: I got a suggestion by email from Howard Gray, which I havenot yet tested. It uses RDP instead of VNC to get the job done, and theinstallation appears to be simpler, give it a try! This is what he wrote tome:

[…] Much of steps 3 & 4 could be replaced as xrdp installation and theconfiguration is automatic.

> sudo apt-get install -y xrdp

2/18/2015 Raspberry Pi without keyboard, mouse nor screen. &emdash; Edmundo Fuentes

http://edmundofuentes.com/post/45179343394/raspberry-pi-without-keyboard-mouse-nor-screen 5/5

Autostart is configured for you and you don’t need to reboot.

RDP clients are available for any platform (on the Mac there is CoRD orMicrosoft’s own Remote Desktop) for free.

#raspberrypi #raspbian #vnc #vncserver

Reblogs:bloggpi:

Install VNC

Likes: